﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Web;


namespace lxwmvc
{
    [AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = false)]
    public class notAttribute : Attribute
    {
        /// <summary>
        /// 代表必须填写
        /// </summary>
        /// <param name="name"></param>
        public notAttribute()
        { }
    }
    public class jineAttribute : Attribute
    {
        /// <summary>
        /// 代表必须格式化成金额
        /// </summary>
        /// <param name="name"></param>
        public jineAttribute()
        { }
    }
    /// <summary>
    /// 汇付的相关参数
    /// </summary>
    public class HuiFuArg
    {
        /// <summary>
        /// 汇付商户号
        /// </summary>
        public static string MerCustId = ConfigurationManager.AppSettings["MerCustId"];
        public static string ZCBH = ConfigurationManager.AppSettings["ZCBH"];
        /// <summary>
        /// 汇付商户子账户号
        /// </summary>
        public static string AcctId = ConfigurationManager.AppSettings["AcctId"];
        /// <summary>
        /// 汇付URL提交地址
        /// </summary>
        public static string MerUrl = ConfigurationManager.AppSettings["MerUrl"];
        /// <summary>
        /// 汇付返回服务器地址
        /// </summary>
        public static string LocalUrl = ConfigurationManager.AppSettings["LocalUrl"];
        /// <summary>
        /// 提现自动复核限制金额 初始金额1w
        /// </summary>
        public static string CashAudit = ConfigurationManager.AppSettings["CashAudit"];
        /// <summary>
        /// 我要投标汇付最大投资手续费率
        /// </summary>
        public static string MaxTenderRate = ConfigurationManager.AppSettings["MaxTenderRate"];
        /// <summary>
        /// 满标后系统自动进行放款 手续费
        /// </summary>
        public static string LoansFee = ConfigurationManager.AppSettings["LoansFee"];
        /// <summary>
        /// 自动还款 手续费
        /// </summary>
        public static string RepaymentFee = ConfigurationManager.AppSettings["RepaymentFee"];

        /// <summary>
        /// 取现收取用户服务费0.0025
        /// </summary>
        public static string CashFee = ConfigurationManager.AppSettings["CashFee"];

        /// <summary>
        /// 债权转让手续费
        /// </summary>
        public static string DivFee = ConfigurationManager.AppSettings["DivFee"];
    }
    /// <summary>
    /// 撤标请求信息
    /// </summary>
    public class TenderCancle
    {
        /// <summary>
        /// 版本号:2.0 接口中此字段的值为 20，如版本升级，能向前兼容
        /// </summary>
        [not]
        public string Version = "20";
        /// <summary>
        /// 消息类型:每一种消息类型代表一种交易，此处为TenderCancle
        /// </summary>
        [not]
        public string CmdId = "TenderCancle";
        /// <summary>
        /// 商户客户号:由汇付生成，商户的唯一性标识
        /// </summary>
        [not]
        public string MerCustId = HuiFuArg.MerCustId;
        /// <summary>
        /// 订单号:由商户的系统生成，必须保证唯一，请使用纯数字
        /// </summary>
        [not]
        public string OrdId = core_huifu.getOrdId(huifu_lx.chebiao);
        /// <summary>
        /// 订单日期:格式为 YYYYMMDD，例如：20130307
        /// </summary>
        [not]
        public string OrdDate = DateTime.Now.ToString("yyyyMMdd");
        /// <summary>
        /// 交易金额:泛指交易金额，如充值、支付、取现、冻结和解冻金额（金额格式必须是###.00）比如 2.00，2.01
        /// </summary>
        [not]
        [jine]
        public string TransAmt = "";
        /// <summary>
        /// 用户客户号:由汇付生成，用户的唯一性标识
        /// </summary>
        [not]
        public string UsrCustId = "";
        /// <summary>
        /// 是否解冻:Y--解冻
        ///          N--不解冻
        /// </summary>
        [not]
        public string IsUnFreeze = "";
        /// <summary>
        /// 解冻订单号:解冻订单号如果 IsUnFreeze 参数传 Y，那么该参数不能为空
        /// </summary>
        public string UnFreezeOrdId = "";
        /// <summary>
        /// 冻结标识:8 位本平台日期+10 位系统流水号
        /// </summary>
        public string FreezeTrxId = "";
        /// <summary>
        /// 页面返回 URL
        /// </summary>
        public string RetUrl = "";
        /// <summary>
        /// 商户后台应答地址
        /// </summary>
        [not]
        public string BgRetUrl = "";
        /// <summary>
        /// 入参扩展域
        /// </summary>
        public string ReqExt = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = "Version +CmdId + MerCustId + OrdId + OrdDate + TransAmt + UsrCustId+ IsUnFreeze+ UnFreezeOrdId+ FreezeTrxId + RetUrl + BgRetUrl + MerPriv+ ReqExt";

    }

    /// <summary>
    /// 撤标返回信息
    /// </summary>
    public class RetTenderCancle
    {
        /// <summary>
        /// 消息类型:每一种消息类型代表一种交易，此处为TenderCancle
        /// </summary>
        [not]
        public string CmdId = "TenderCancle";
        /// <summary>
        /// 应答返回码: 000--调用成功
        /// </summary>
        [not]
        public string RespCode = "";
        /// <summary>
        /// 应答描述：返回码的对应中文描述
        /// </summary>
        [not]
        public string RespDesc = "";
        /// <summary>
        /// 商户客户号：由汇付生成，商户的唯一性标识
        /// </summary>
        [not]
        public string MerCustId = "";
        /// <summary>
        /// 订单号：由商户的系统生成，必须保证唯一，请使用纯数字
        /// </summary>
        [not]
        public string OrdId = "";
        /// <summary>
        /// 订单日期：格式为 YYYYMMDD
        /// </summary>
        [not]
        public string OrdDate = "";
        /// <summary>
        /// 交易金额：泛指交易金额，如充值、支付、取现、冻结和解冻金额（金额格式必须是###.00）比如 2.00，2.01
        /// </summary>
        [not]
        [jine]
        public string TransAmt = "";
        /// <summary>
        /// 用户客户号:由汇付生成，用户的唯一性标识
        /// </summary>
        [not]
        public string UsrCustId = "";
        /// <summary>
        /// 是否解冻:Y--解冻
        ///          N--不解冻
        /// </summary>
        [not]
        public string IsUnFreeze = "";
        /// <summary>
        /// 解冻订单号
        /// </summary>
        public string UnFreezeOrdId = "";
        /// <summary>
        /// 冻结标识:8 位本平台日期+10 位系统流水号
        /// </summary>
        public string FreezeTrxId = "";
        /// <summary>
        /// 页面返回 URL
        /// </summary>
        public string RetUrl = "";
        /// <summary>
        /// 商户后台应答地址
        /// </summary>
        [not]
        public string BgRetUrl = "";
        /// <summary>
        /// 商户私有域
        /// </summary>
        public string MerPriv = "";
        /// <summary>
        /// 入参扩展域
        /// </summary>
        public string RespExt = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = "CmdId + RespCode + MerCustId + OrdId + OrdDate + TransAmt + UsrCustId + IsUnFreeze+ UnFreezeOrdId + FreezeTrxId+ RetUrl + BgRetUrl + MerPriv+ RespExt";

    }

    /// <summary>
    /// 生利宝交易接口
    /// </summary>
    public class FssTrans
    {
        /// <summary>
        /// 版本号:目前固定为 10，如版本升级，能向前兼容
        /// </summary>
        [not]
        public string Version = "10";
        /// <summary>
        /// 消息类型:每一种消息类型代表一种交易，此处为 FssTrans
        /// </summary>
        [not]
        public string CmdId = "FssTrans";
        /// <summary>
        /// 商户客户号:由汇付生成，商户的唯一性标识
        /// </summary>
        [not]
        public string MerCustId = HuiFuArg.MerCustId;
        /// <summary>
        /// 用户客户号:由汇付生成，商户的唯一性标识
        /// </summary>
        [not]
        public string UsrCustId = "";
        /// <summary>
        /// 订单号:由商户的系统生成，必须保证唯一，请使用纯数字
        /// </summary>
        [not]
        public string OrdId = core_huifu.getOrdId(huifu_lx.shenglibao);
        /// <summary>
        /// 订单日期:格式为 YYYYMMDD
        /// </summary>
        [not]
        public string OrdDate = DateTime.Now.ToString("yyyyMMdd");
        /// <summary>
        /// 页面返回 URL
        /// </summary>
        public string RetUrl = "";
        /// <summary>
        /// 商户后台应答地址
        /// </summary>
        [not]
        public string BgRetUrl = "";
        /// <summary>
        /// 商户私有域
        /// </summary>
        public string MerPriv = "";
        /// <summary>
        /// 入参扩展域
        /// </summary>
        public string ReqExt = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"Version + CmdId + MerCustId + UsrCustId + OrdId+ OrdDate + RetUrl + BgRetUrl + MerPriv + ReqExt";
    }

    /// <summary>
    /// 生利宝接口返回相关信息
    /// </summary>
    public class RetFssTrans
    {
        /// <summary>
        /// 消息类型:每一种消息类型代表一种交易，此处为 FssTrans
        /// </summary>
        [not]
        public string CmdId = "";
        /// <summary>
        /// 应答返回码:000--调用成功
        /// </summary>
        [not]
        public string RespCode = "";
        /// <summary>
        /// 应答描述:返回码的对应中文描述
        /// </summary>
        [not]
        public string RespDesc = "";
        /// <summary>
        /// 商户客户号:由汇付生成，商户的唯一性标识
        /// </summary>
        [not]
        public string MerCustId = "";
        /// <summary>
        /// 用户客户号:由汇付生成，商户的唯一性标识
        /// </summary>
        [not]
        public string UsrCustId = "";
        /// <summary>
        /// 订单号
        /// </summary>
        [not]
        public string OrdId = "";
        /// <summary>
        /// 订单日期
        /// </summary>
        [not]
        public string OrdDate = "";
        /// <summary>
        /// 生利宝交易类型:I--转入生利宝
        ///                O--转出生利宝
        /// </summary>
        [not]
        public string TransType = "";
        /// <summary>
        /// 交易金额
        /// </summary>
        [not]
        [jine]
        public string TransAmt = "";
        /// <summary>
        /// 页面返回 URL
        /// </summary>        
        public string RetUrl = "";
        /// <summary>
        /// 商户后台应答地址
        /// </summary>
        [not]
        public string BgRetUrl = "";
        /// <summary>
        /// 商户私有域
        /// </summary>
        public string MerPriv = "";
        /// <summary>
        /// 返参扩展域
        /// </summary>
        public string RespExt = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"CmdId + RespCode + MerCustId + UsrCustId + OrdId+ OrdDate+ TransType + TransAmt +  RetUrl +BgRetUrl + MerPriv + RespExt";
    }

    /// <summary>
    /// 生利宝产品信息
    /// </summary>
    public class QueryFss
    {
        /// <summary>
        /// 版本号:目前固定为 10，如版本升级，能向前兼容
        /// </summary>
        [not]
        public string Version = "10";
        /// <summary>
        /// 消息类型:每一种消息类型代表一种交易，此处为 QueryFss
        /// </summary>
        [not]
        public string CmdId = "QueryFss";
        /// <summary>
        /// 商户客户号:由汇付生成，商户的唯一性标识
        /// </summary>
        [not]
        public string MerCustId = HuiFuArg.MerCustId;
        /// <summary>
        /// 入参扩展域:用于扩展请求参数
        /// </summary>
        public string ReqExt = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"Version+CmdId+MerCustId+ ReqExt";
    }

    /// <summary>
    /// 生利宝查询信息
    /// </summary>
    public class RetQueryFss
    {
        /// <summary>
        /// 消息类型:每一种消息类型代表一种交易，此处为 QueryFss
        /// </summary>
        [not]
        public string CmdId = "";
        /// <summary>
        /// 应答返回码:000--调用成功
        /// </summary>
        [not]
        public string RespCode = "";
        /// <summary>
        /// 应答描述:返回码的对应中文描述
        /// </summary>
        [not]
        public string RespDesc = "";
        /// <summary>
        /// 商户客户号:由汇付生成，商户的唯一性标识
        /// </summary>
        [not]
        public string MerCustId = "";
        /// <summary>
        /// 最新收益率
        /// </summary>
        public string PrdRate = "";//最新收益率
        /// <summary>
        /// 最近 7 日年化收益率
        /// </summary>
        public string AnnuRate = "";//最近 7 日年化收益率       
        /// <summary>
        /// 返参扩展域
        /// </summary>
        public string RespExt = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"CmdId+RespCode+MerCustId+ AnnuRate+PrdRate+RespExt";
    }

    /// <summary>
    /// 生利宝用户信息
    /// </summary>
    public class QueryFssAccts
    {
        /// <summary>
        /// 版本号:目前固定为 10，如版本升级，能向前兼容
        /// </summary>
        [not]
        public string Version = "10";
        /// <summary>
        /// 消息类型:每一种消息类型代表一种交易,此处为 QueryFssAccts
        /// </summary>
        [not]
        public string CmdId = "QueryFssAccts";
        /// <summary>
        /// 商户客户号:由汇付生成，商户的唯一性标识
        /// </summary>
        [not]
        public string MerCustId = HuiFuArg.MerCustId;
        /// <summary>
        /// 用户客户号:由汇付生成，用户的唯一性标识
        /// </summary>
        [not]
        public string UsrCustId = "";
        /// <summary>
        /// 入参扩展域
        /// </summary>
        public string ReqExt = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"Version+CmdId+MerCustId+UsrCustId+ ReqExt";
    }

    /// <summary>
    /// 生利宝用户信息返回
    /// </summary>
    public class RetQueryFssAccts
    {
        /// <summary>
        /// 消息类型:每一种消息类型代表一种交易，此处为QueryFssAccts
        /// </summary>
        [not]
        public string CmdId = "";
        /// <summary>
        /// 应答返回码:000--调用成功
        /// </summary>
        [not]
        public string RespCode = "";
        /// <summary>
        /// 应答描述:返回码的对应中文描述
        /// </summary>
        [not]
        public string RespDesc = "";
        /// <summary>
        /// 商户客户号:由汇付生成，商户的唯一性标识
        /// </summary>
        [not]
        public string MerCustId = "";
        /// <summary>
        /// 用户客户号:由汇付生成，用户的唯一性标识
        /// </summary>
        [not]
        public string UsrCustId = "";
        /// <summary>
        /// 生利宝余额
        /// </summary>
        [jine]
        public string TotalAsset = "";//生利宝余额
        /// <summary>
        /// 生利宝历史累计收益
        /// </summary>
        [jine]
        public string TotalProfit = "";//历史累计收益
        /// <summary>
        /// 返参扩展域
        /// </summary>
        public string RespExt = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"CmdId+RespCode+MerCustId+UsrCustId+TotalAsset+TotalProfit+RespExt";
    }

    /// <summary>
    /// 开户
    /// </summary>
    public class UserRegister
    {
        /// <summary>
        /// 版本号:目前固定为 10，如版本升级，能向前兼容
        /// </summary>
        [not]
        public string Version = "10";
        /// <summary>
        /// 消息类型:每一种消息类型代表一种交易，此处为 UserRegister
        /// </summary>  
        [not]
        public string CmdId = "UserRegister";
        /// <summary>
        /// 商户客户号:由汇付生成，商户的唯一性标识
        /// </summary>
        [not]
        public string MerCustId = HuiFuArg.MerCustId;
        /// <summary>
        /// 商户后台应答地址
        /// </summary>
        [not]
        public string BgRetUrl = "";
        /// <summary>
        /// 页面返回 URL
        /// </summary>
        public string RetUrl = "";
        /// <summary>
        /// 用户号:商户下的平台 用户号，在每个商户下唯一（必须是6-25 位的半角字符）
        /// </summary>
        public string UsrId = "";
        /// <summary>
        /// 真实名称:用户的真实姓名
        /// </summary>
        public string UsrName = "";
        /// <summary>
        /// 证件类型:00-- 身份证
        /// </summary>
        public string IdType = "00";
        /// <summary>
        /// 证件号码:用户证件号码
        /// </summary>
        public string IdNo = "";
        /// <summary>
        /// 手机号:本平台系统提供按照手机号查询订单的功能
        /// </summary>
        public string UsrMp = "";
        /// <summary>
        /// 用户 Email:操作员的 Email
        /// </summary>
        public string UsrEmail = "";
        /// <summary>
        /// 商户私有域
        /// </summary>
        public string MerPriv = "";
        /// <summary>
        /// 编码集
        /// </summary>
        public string CharSet = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"Version  + CmdId  + MerCustId  + BgRetUrl  +
RetUrl + UsrId + UsrName + IdType + IdNo + UsrMp + UsrEmail+ MerPriv";

    }

    /// <summary>
    /// 解冻
    /// </summary>
    public class UsrUnFreeze
    {
        /// <summary>
        /// 版本号:固定为 10，如版本升级，能向前兼容
        /// </summary>
        [not]
        public string Version = "10";
        /// <summary>
        /// 消息类型:每一种消息类型代表一种交易，此处为UsrUnFreeze
        /// </summary>
        [not]
        public string CmdId = "UsrUnFreeze";
        /// <summary>
        /// 商户客户号:由汇付生成，商户的唯一性标识
        /// </summary>
        [not]
        public string MerCustId = HuiFuArg.MerCustId;
        /// <summary>
        /// 订单号:由商户的系统生成，必须保证唯一，请使用纯数字
        /// </summary>
        [not]
        public string OrdId = core_huifu.getOrdId(huifu_lx.jiedong);
        /// <summary>
        /// 订单日期:格式为 YYYYMMDD
        /// </summary>
        [not]
        public string OrdDate = DateTime.Now.ToString("yyyyMMdd");
        /// <summary>
        /// 本平台交易唯一标识:8 位本平台日期+10 位系统流水号
        /// </summary>
        [not]
        public string TrxId = "";
        /// <summary>
        /// 页面返回 URL
        /// </summary>
        public string RetUrl = "";
        /// <summary>
        /// 商户后台应答地址
        /// </summary>
        [not]
        public string BgRetUrl = "";
        /// <summary>
        /// 商户私有域
        /// </summary>
        public string MerPriv = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"Version  + CmdId  + MerCustId  + OrdId  +
OrdDate + TrxId + RetUrl + BgRetUrl +MerPriv";

    }
    /// <summary>
    /// 解冻返回
    /// </summary>
    public class RetUsrUnFreeze
    {
        /// <summary>
        /// 版本号:固定为 10，如版本升级，能向前兼容
        /// </summary>
        [not]
        public string Version = "10";
        /// <summary>
        /// 消息类型:每一种消息类型代表一种交易，此处为 UsrUnFreeze
        /// </summary>
        [not]
        public string CmdId = "UsrUnFreeze";
        /// <summary>
        /// 应答返回码:000--调用成功
        /// </summary>
        [not]
        public string RespCode = "";
        /// <summary>
        /// 应答描述:返回码的对应中文描述
        /// </summary>
        [not]
        public string RespDesc = "";
        /// <summary>
        /// 商户客户号:由汇付生成，商户的唯一性标识
        /// </summary>
        [not]
        public string MerCustId = "";
        /// <summary>
        /// 订单号:由商户的系统生成，必须保证唯一，请使用纯数字
        /// </summary>
        [not]
        public string OrdId = "";
        /// <summary>
        /// 订单日期:格式为 YYYYMMDD
        /// </summary>
        [not]
        public string OrdDate = "";
        /// <summary>
        /// 本平台交易唯一标识:8 位本平台日期+10 位系统流水号
        /// </summary>
        public string TrxId = "";
        /// <summary>
        /// 页面返回 URL
        /// </summary>
        public string RetUrl = "";
        /// <summary>
        /// 商户后台 应答地址
        /// </summary>
        [not]
        public string BgRetUrl = "";
        /// <summary>
        /// 商户私有域
        /// </summary>
        public string MerPriv = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"Version  + CmdId  + MerCustId  + OrdId  +
OrdDate + TrxId + RetUrl + BgRetUrl +MerPriv";

    }

    //RECV_ORD_ID_和 TRXID

    /// <summary>
    /// 开户返回信息
    /// </summary>
    public class RetUserRegister
    {
        /// <summary>
        /// 消息类型:每一种消息类型代表一种交易，此处为 UserRegister
        /// </summary>  
        [not]
        public string CmdId = "UserRegister";
        /// <summary>
        /// 应答返回码
        /// </summary>
        [not]
        public string RespCode = "";
        /// <summary>
        /// 应答描述
        /// </summary>
        [not]
        public string RespDesc = "";
        /// <summary>
        /// 商户客户号
        /// </summary>
        [not]
        public string MerCustId = HuiFuArg.MerCustId;
        /// <summary>
        /// 用户号
        /// </summary>
        [not]
        public string UsrId = "";
        /// <summary>
        /// 用户客户号
        /// </summary>
        [not]
        public string UsrCustId = "";
        /// <summary>
        /// 商户后台应答地址
        /// </summary>
        [not]
        public string BgRetUrl = "";
        /// <summary>
        /// 本平台交易唯一标识
        /// </summary>
        public string TrxId = "";
        /// <summary>
        /// 页面返回 URL
        /// </summary>
        public string RetUrl = "";
        /// <summary>
        /// 商户私有域
        /// </summary>
        public string MerPriv = "";
        /// <summary>
        /// 证件类型:00-- 身份证
        /// </summary>
        public string IdType = "00";
        /// <summary>
        /// 证件号码:用户证件号码
        /// </summary>
        public string IdNo = "";
        /// <summary>
        /// 手机号:本平台系统提供按照手机号查询订单的功能
        /// </summary>
        public string UsrMp = "";
        /// <summary>
        /// 用户 Email:操作员的 Email
        /// </summary>
        public string UsrEmail = "";
        /// <summary>
        ///真实名称
        /// </summary>
        public string UsrName = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"CmdId   +  RespCode+   MerCustId   +  UsrId+
UsrCustId +BgRetUrl + TrxId +RetUrl + MerPriv

";

    }

    /// <summary>
    /// 后台开户信息
    /// </summary>
    public class BgRegister
    {
        /// <summary>
        /// 版本号
        /// </summary>
        [not]
        public string Version = "10";
        /// <summary>
        /// 消息类型
        /// </summary>
        [not]
        public string CmdId = "BgRegister";
        /// <summary>
        /// 商户客号
        /// </summary>
        [not]
        public string MerCustId = HuiFuArg.MerCustId;
        /// <summary>
        /// 用户号
        /// </summary>
        [not]
        public string UsrId = "";
        /// <summary>
        /// 真实名称
        /// </summary>
        [not]
        public string UsrName = "";
        /// <summary>
        /// 用户登录密码
        /// </summary>
        [not]
        public string LoginPwd = "";
        /// <summary>
        /// 用户交易密码
        /// </summary>
        [not]
        public string TransPwd = "";
        /// <summary>
        /// 证件类型
        /// </summary>        
        public string IdType = "";
        /// <summary>
        /// 证件号码
        /// </summary>
        public string IdNo = "";
        /// <summary>
        /// 手机号
        /// </summary>
        public string UsrMp = "";
        /// <summary>
        /// 用户 Email
        /// </summary>
        public string UsrEmail = "";
        /// <summary>
        /// 商户私有域
        /// </summary>
        public string MerPriv = "";
        /// <summary>
        /// 编码集
        /// </summary>
        public string CharSet = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"Version+ CmdId + MerCustId + UsrId+ UsrName+
LoginPwd + TransPwd + IdType + IdNo + UsrMp + UsrEmail+ MerPriv";
    }


    /// <summary>
    /// 用户绑卡
    /// </summary>
    public class UserBindCard
    {
        /// <summary>
        /// 版本号:目前固定为 10，如版本升级，能向前兼容
        /// </summary>
        [not]
        public string Version = "10";
        /// <summary>
        /// 消息类型:每一种消息类型代表一种交易，此处为 UserBindCard
        /// </summary>
        [not]
        public string CmdId = "UserBindCard";
        /// <summary>
        /// 商户客户号由汇付生成，商户的唯一性标识
        /// </summary>
        [not]
        public string MerCustId = HuiFuArg.MerCustId;
        /// <summary>
        /// 用户客户号:由汇付生成，商户的唯一性标识
        /// </summary>
        [not]
        public string UsrCustId = "";
        /// <summary>
        /// 商户后台应答地址
        /// </summary>
        [not]
        public string BgRetUrl = "";
        /// <summary>
        /// 商户私有域
        /// </summary>        
        public string MerPriv = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"Version +
CmdId + MerCustId + UsrCustId +
BgRetUrl+MerPriv";

    }

    /// <summary>
    /// 用户绑卡返回
    /// </summary>
    public class RetUserBindCard
    {
        /// <summary>
        /// 消息类型:每一种消息类型代表一种交易，此处为UserBindCard
        /// </summary>
        [not]
        public string CmdId = "";
        /// <summary>
        /// 应答返回码
        /// </summary>
        [not]
        public string RespCode = "";
        /// <summary>
        /// 应答描述
        /// </summary>
        [not]
        public string RespDesc = "";
        /// <summary>
        /// 商户客户号
        /// </summary>
        [not]
        public string MerCustId = "";
        /// <summary>
        /// 开户银行账号:取现银行的账户号（银行卡号）
        /// </summary>
        public string OpenAcctId = "";
        /// <summary>
        /// 开户银行代号
        /// </summary>
        public string OpenBankId = "";
        /// <summary>
        /// 用户客户号
        /// </summary>
        [not]
        public string UsrCustId = "";
        /// <summary>
        /// 本平台交易唯一标识
        /// </summary>
        public string TrxId = "";
        /// <summary>
        /// 商户私有域
        /// </summary>        
        public string MerPriv = "";
        /// <summary>
        /// 商户后台应答地址
        /// </summary>
        [not]
        public string BgRetUrl = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"CmdId+RespCode+MerCustId+OpenAcctId+ OpenBankId + UsrCustId+ TrxId + BgRetUrl + MerPriv";
    }


    /// <summary>
    /// 删除银行卡
    /// </summary>
    public class DelCard
    {
        /// <summary>
        /// 版本号:目前固定为 10，如版本升级，能向前兼容
        /// </summary>
        [not]
        public string Version = "10";
        /// <summary>
        /// 消息类型:每一种消息类型代表一种交易，此处为 DelCard
        /// </summary>
        [not]
        public string CmdId = "DelCard";
        /// <summary>
        /// 商户客户号
        /// </summary>
        [not]
        public string MerCustId = HuiFuArg.MerCustId;
        /// <summary>
        /// 用户客户号
        /// </summary>
        [not]
        public string UsrCustId = "";
        /// <summary>
        /// 开户银行账号
        /// </summary>
        [not]
        public string CardId = ""; //银行卡号
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"Version +
CmdId + MerCustId + UsrCustId +
CardId";

    }

    /// <summary>
    /// 接触银行卡返回信息
    /// </summary>
    public class RetDelCard
    {
        /// <summary>
        /// 消息类型
        /// </summary>
        [not]
        public string CmdId = "";
        /// <summary>
        /// 应答返回码:000--调用成功 
        /// </summary>
        [not]
        public string RespCode = "";
        /// <summary>
        /// 消息类型:每一种消息类型代表一种交易，此处为 DelCard
        /// </summary>
        [not]
        public string RespDesc = "";
        /// <summary>
        /// 商户客户号
        /// </summary>
        [not]
        public string MerCustId = "";
        /// <summary>
        /// 用户客户号
        /// </summary>
        [not]
        public string UsrCustId = "";
        /// <summary>
        /// 开户银行账号
        /// </summary>
        [not]
        public string CardId = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"CmdId+RespCode+MerCustId+ UsrCustId+ CardId";
    }

    /// <summary>
    /// 后台开户返回信息
    /// </summary>
    public class RetBgRegister
    {
        /// <summary>
        /// 消息类型
        /// </summary>
        [not]
        public string CmdId = "";
        /// <summary>
        /// 应答返回码
        /// </summary>
        [not]
        public string RespCode = "";
        /// <summary>
        /// 应答描述
        /// </summary>
        [not]
        public string RespDesc = "";
        /// <summary>
        /// 商户客号
        /// </summary>
        [not]
        public string MerCustId = "";
        /// <summary>
        /// 用户号
        /// </summary>
        [not]
        public string UsrId = "";
        /// <summary>
        /// 用户客号
        /// </summary>
        [not]
        public string UsrCustId = "";
        /// <summary>
        /// 商户私有域
        /// </summary>        
        public string MerPriv = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"CmdId +
RespCode+ MerCustId + UsrId+ UsrCustId +
MerPriv";
    }

    /// <summary>
    /// 后台绑卡
    /// </summary>
    public class BgBindCard
    {
        /// <summary>
        /// 版本号
        /// </summary>
        [not]
        public string Version = "";
        /// <summary>
        /// 消息类型
        /// </summary>
        [not]
        public string CmdId = "";
        /// <summary>
        /// 商户客号
        /// </summary>
        [not]
        public string MerCustId = "";
        /// <summary>
        /// 用户客号
        /// </summary>
        [not]
        public string UsrCustId = "";
        /// <summary>
        /// 开户银行账号
        /// </summary>
        [not]
        public string OpenAcctId = "";
        /// <summary>
        /// 开户银行代号
        /// </summary>
        [not]
        public string OpenBankId = "";
        /// <summary>
        /// 开户银行省份
        /// </summary>
        [not]
        public string OpenProvId = "";
        /// <summary>
        /// 开户银行地区
        /// </summary>
        [not]
        public string OpenAreaId = "";
        /// <summary>
        /// 开户银行支名称
        /// </summary>
        public string OpenBranchName = "";
        /// <summary>
        /// 是否默认:Y：设置为默认取现卡
        ///          N: 不设置为默认取现卡
        /// </summary>
        [not]
        public string IsDefault = "";
        /// <summary>
        /// 商户私有域
        /// </summary>
        public string MerPriv = "";
        /// <summary>
        /// 编码集
        /// </summary>
        public string CharSet = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"Version  +CmdId + MerCustId  + UsrCustId  + OpenAcctId+
OpenBankId   +   OpenProvId   +   OpenAreaId   + OpenBranchName + IsDefault + MerPriv";
    }

    /// <summary>
    /// 后台绑卡返回信息
    /// </summary>
    public class RetBgBindCard
    {
        /// <summary>
        /// 消息类型
        /// </summary>
        [not]
        public string CmdId = "";
        /// <summary>
        /// 应答返回码
        /// </summary>
        [not]
        public string RespCode = "";
        /// <summary>
        /// 应答描述
        /// </summary>
        [not]
        public string RespDesc = "";
        /// <summary>
        /// 商户客号
        /// </summary>
        [not]
        public string MerCustId = "";
        /// <summary>
        /// 用户客号
        /// </summary>
        [not]
        public string UsrCustId = "";
        /// <summary>
        /// 开户银行账号
        /// </summary>
        [not]
        public string OpenAcctId = "";
        /// <summary>
        /// 开户银行代号
        /// </summary>
        [not]
        public string OpenBankId = "";
        /// <summary>
        /// 商户私有域
        /// </summary>
        public string MerPriv = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"CmdId +
RespCode+ MerCustId + UsrCustId +
OpenAcctId+ OpenBankId + MerPriv";
    }

    /// <summary>
    /// 页面调用方式 post提交过去
    /// </summary>
    public class UserLogin
    {
        /// <summary>
        /// 版本号:目前固定为 10，如版本升级，能向前兼容
        /// </summary>
        [not]
        public string Version = "10";
        /// <summary>
        /// 消息类型:每一种消息类型代表一种交易，此处为 UserLogin
        /// </summary>
        [not]
        public string CmdId = "UserLogin";
        /// <summary>
        /// 商户客户号
        /// </summary>
        [not]
        public string MerCustId = HuiFuArg.MerCustId;
        /// <summary>
        /// 用户客户号
        /// </summary>
        [not]
        public string UsrCustId = "6000060000395843";
    }

    /// <summary>
    /// 充值
    /// </summary>
    public class NetSave
    {
        /// <summary>
        /// 版本号:固定为 10，如版本升级，能向前兼容
        /// </summary>
        [not]
        public string Version = "10";//version
        /// <summary>
        /// 消息类型:每一种消息类型代表一种交易，此处为 NetSave
        /// </summary>
        [not]
        public string CmdId = "NetSave";
        /// <summary>
        /// 商户客户号
        /// </summary>
        [not]
        public string MerCustId = HuiFuArg.MerCustId;
        /// <summary>
        /// 用户客户号   
        /// </summary>
        [not]
        public string UsrCustId = "6000060000395530";
        /// <summary>
        /// 订单号
        /// </summary>
        [not]
        public string OrdId = core_huifu.getOrdId(huifu_lx.chongzhi);
        /// <summary>
        /// 订单日期
        /// </summary>
        [not]
        public string OrdDate = DateTime.Now.ToString("yyyyMMdd");
        /// <summary>
        /// 支付网关业务代号
        /// </summary>
        public string GateBusiId = "";
        /// <summary>
        /// 开户银行代号
        /// </summary>
        public string OpenBankId = "";
        /// <summary>
        /// 借贷记标记
        /// </summary>
        public string DcFlag = "";
        //充钱必须是.00
        /// <summary>
        /// 交易金额
        /// </summary>
        [not]
        [jine]
        public string TransAmt = "1000.00";
        /// <summary>
        /// 页面返回 URL
        /// </summary>
        public string RetUrl = "";
        /// <summary>
        /// 商户后台应答地址
        /// </summary>
        [not]
        public string BgRetUrl = "";
        /// <summary>
        /// 商户私有域
        /// </summary>
        public string MerPriv = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"Version +CmdId + MerCustId + UsrCustId +OrdId+ 	OrdDate 	+ 	GateBusiId+
OpenBankId+  DcFlag  +TransAmt+  RetUrl+ BgRetUrl+ MerPriv";


    }

    /// <summary>
    /// 这个在另外一个页面获取 充值返回信息
    /// </summary>
    public class RetNetSave
    {
        /// <summary>
        /// 消息类型:每一种消息类型代表一种交易，此处为 NetSave
        /// </summary>
        [not]
        public string CmdId = "NetSave";
        /// <summary>
        /// 应答返回码 :000：调用成功
        /// </summary>
        [not]
        public string RespCode = "";
        /// <summary>
        /// 应答描述:返回码的对应中文描述
        /// </summary>
        [not]
        public string RespDesc = "";
        /// <summary>
        /// 商户客户号:由汇付生成，商户的唯一性标识
        /// </summary>
        [not]
        public string MerCustId = "";
        /// <summary>
        /// 用户客户号:由汇付生成，商户的唯一性标识
        /// </summary>
        [not]
        public string UsrCustId = "";
        /// <summary>
        /// 订单号:由商户的系统生成，必须保证唯一，请使用纯数字
        /// </summary>
        [not]
        public string OrdId = "";
        /// <summary>
        /// 订单日期:格式为 YYYYMMDD
        /// </summary>
        [not]
        public string OrdDate = "";
        /// <summary>
        /// 交易金额
        /// </summary>
        [not]
        [jine]
        public string TransAmt = "";
        /// <summary>
        /// 本平台交易唯一标识
        /// </summary>
        public string TrxId = "";
        /// <summary>
        /// 页面返回 URL
        /// </summary>
        public string RetUrl = "";
        /// <summary>
        /// 商户后台应答地址
        /// </summary>
        [not]
        public string BgRetUrl = "";
        /// <summary>
        /// 商户私有域
        /// </summary>
        public string MerPriv = "";
        /// <summary>
        /// 支付网关业务代号
        /// </summary>
        public string GateBusiId = "";
        /// <summary>
        /// 开户银行代号
        /// </summary>
        public string GateBankId = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"CmdId + RespCode +MerCustId +UsrCustId+OrdId+ OrdDate+ TransAmt+
TrxId+ RetUrl+ BgRetUrl+ MerPriv";
        /// <summary>
        /// 手续费金额:取现手续费+垫资手续费
        /// </summary>
        [not]
        public string FeeAmt = "";
        /// <summary>
        /// 手续费扣款客户号
        /// </summary>
        [not]
        public string FeeCustId = "";
        /// <summary>
        /// 手续费扣款子账户号
        /// </summary>
        [not]
        public string FeeAcctId = "";
    }

    /// <summary>
    /// 主动投票 20接口
    /// </summary>
    public class InitiativeTender
    {
        /// <summary>
        /// 版本号:2.0 接口中此字段的值为 20，如版本升级，能向前兼容
        /// </summary>
        [not]
        public string Version = "20";
        /// <summary>
        /// 消息类型:每一种消息类型代表一种交易，此处为InitiativeTender
        /// </summary>
        [not]
        public string CmdId = "InitiativeTender";
        /// <summary>
        /// 商户客户号:由汇付生成，商户的唯一性标识
        /// </summary>
        [not]
        public string MerCustId = HuiFuArg.MerCustId;
        /// <summary>
        /// 订单号:由商户的系统生成，必须保证唯一，请使用纯数字
        /// </summary>
        [not]
        public string OrdId = core_huifu.getOrdId(huifu_lx.toubiao);
        /// <summary>
        /// 订单日期:格式为 YYYYMMDD
        /// </summary>
        [not]
        public string OrdDate = DateTime.Now.ToString("yyyyMMdd");
        /// <summary>
        /// 交易金额
        /// </summary>
        [not]
        [jine]
        public string TransAmt = "20.00";
        /// <summary>
        /// 用户客户号:由汇付生成，用户的唯一性标识
        /// </summary>
        [not]
        public string UsrCustId = "6000060000395530";//投资人
        /// <summary>
        /// 最大投资手续费率
        /// </summary>
        [not]
        public string MaxTenderRate = "0.01";
        /// <summary>
        /// 借款人
        /// </summary>
        [not]
        public string BorrowerDetails = ("[{\"BorrowerCustId\":\"6000060000395843\",\"BorrowerAmt\":\"20.00\",\"BorrowerRate\":\"0.18\"}]");

        //proid 不能传递

        //,\"ProId\":\"" + DateTime.Now.ToString("yyyyMMddHHmmssfff") + "\"
        //BorrowerRate 手续费+利率

        //下面四个参数不用传递
        //public string BorrowerCustId = "";
        //public string BorrowerAmt = "";
        //public string BorrowerRate = "";
        //public string ProId = "";

        /// <summary>
        /// 是否冻结:Y--冻结
        ///          N--不冻结
        /// </summary>
        //这个地方必须设置成Y。
        [not]
        public string IsFreeze = "Y";
        //[request]
        /// <summary>
        /// 冻结订单号:如果 IsFreeze 参数传 Y，那么该参数不能为空
        /// </summary>
        public string FreezeOrdId = core_huifu.getOrdId(huifu_lx.dongjie);
        /// <summary>
        /// 页面返回 URL
        /// </summary>
        public string RetUrl = "http://www.ieprint.com.cn/index";
        /// <summary>
        /// 商户后台应答地址
        /// </summary>
        [not]
        public string BgRetUrl = "http://www.ieprint.com.cn/index";
        /// <summary>
        /// 商户私有域
        /// </summary>
        public string MerPriv = "";
        /// <summary>
        /// 入参扩展域
        /// </summary>
        public string ReqExt = "";
        //public string AcctId = "";
        ////商户出的代金券
        //public string VocherAmt = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"Version +CmdId + MerCustId + OrdId +
OrdDate + TransAmt + UsrCustId + MaxTenderRate + BorrowerDetails + IsFreeze+ FreezeOrdId+ RetUrl +BgRetUrl + MerPriv+ ReqExt";
    }

    /// <summary>
    /// 主动投标返回信息
    /// </summary>
    public class RetInitiativeTender
    {
        /// <summary>
        /// 消息类型:每一种消息类型代表一种交易，此处为InitiativeTender
        /// </summary>
        [not]
        public string CmdId = "";
        /// <summary>
        /// 应答返回码:000--调用成功
        /// </summary>
        [not]
        public string RespCode = "";
        /// <summary>
        /// 应答描述:返回码的对应中文描述
        /// </summary>
        [not]
        public string RespDesc = "";
        /// <summary>
        /// 商户客户号:由汇付生成，商户的唯一性标识
        /// </summary>
        [not]
        public string MerCustId = "";

        //[print]
        /// <summary>
        /// 订单号:由商户的系统生成，必须保证唯一，请使用纯数字
        /// </summary>
        [not]
        public string OrdId = "";//返回后面需要用到
        /// <summary>
        /// 订单日期:格式为 YYYYMMDD
        /// </summary>
        [not]
        public string OrdDate = "";//返回后面需要用到
        /// <summary>
        /// 交易金额
        /// </summary>
        [not]
        [jine]
        public string TransAmt = "";
        /// <summary>
        /// 用户客户号:由汇付生成，用户的唯一性标识
        /// </summary>
        [not]
        public string UsrCustId = "";

        //[print]
        /// <summary>
        /// 本平台交易唯一标:8 位本平台日期+10 位系统流水号
        /// </summary>
        public string TrxId = "";//这个需要打印出来。
        /// <summary>
        /// 是否冻结:Y--冻结
        ///          N--不冻结
        /// </summary>
        [not]
        public string IsFreeze = "";
        /// <summary>
        /// 冻结订单号
        /// </summary>
        public string FreezeOrdId = "";

        //投标的时候返回的冻结标示
        /// <summary>
        /// 冻结标识:8 位本平台日期+10 位系统流水号
        /// </summary>
        public string FreezeTrxId = "";//返回后面需要用到
        /// <summary>
        /// 页面返回 URL
        /// </summary>
        public string RetUrl = "";
        /// <summary>
        /// 商户后台应答地址
        /// </summary>
        [not]
        public string BgRetUrl = "";
        /// <summary>
        /// 商户私有域
        /// </summary>
        public string MerPriv = "";
        /// <summary>
        /// 返参扩展域:用于扩展返回参数
        /// </summary>
        public string RespExt = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"CmdId+ RespCode + MerCustId + OrdId +
OrdDate + TransAmt + UsrCustId + TrxId + IsFreeze+ FreezeOrdId+FreezeTrxId +RetUrl + BgRetUrl + MerPriv+ RespExt";


    }

    /// <summary>
    /// 这个是放贷  实时数据。
    /// </summary>
    public class Loans
    {
        /// <summary>
        /// 版本号:2.0 接口中此字段的值为 20，如版本升级，能向前兼容
        /// </summary>
        [not]
        public string Version = "20";
        /// <summary>
        /// 消息类型:每一种消息类型代表一种交易，此处为 Loans
        /// </summary>
        [not]
        public string CmdId = "Loans";
        /// <summary>
        /// 商户客户号:由汇付生成，商户的唯一性标识
        /// </summary>
        [not]
        public string MerCustId = HuiFuArg.MerCustId;
        /// <summary>
        /// 订单号:由商户的系统生成，必须保证唯一，请使用纯数字
        /// </summary>
        [not]
        public string OrdId = core_huifu.getOrdId(huifu_lx.fangkuan);
        /// <summary>
        /// 订单日期:格式为 YYYYMMDD
        /// </summary>
        [not]
        public string OrdDate = DateTime.Now.ToString("yyyyMMdd");
        /// <summary>
        /// 出账客户号:由汇付生成，用户的唯一性标识
        /// </summary>
        [not]
        public string OutCustId = "6000060000395530";
        /// <summary>
        /// 交易金额
        /// </summary>
        [not]
        [jine]
        public string TransAmt = "0.01";
        /// <summary>
        /// 扣款手续费
        /// </summary>
        [not]
        [jine]
        public string Fee = "0.01";
        //投标时订单号   需要跟投标一致
        /// <summary>
        /// 订单号
        /// </summary>
        [not]
        public string SubOrdId = "2000000001112222223";
        /// <summary>
        /// 订单日期:格式为 YYYYMMDD
        /// </summary>
        [not]
        public string SubOrdDate = "20130307";
        /// <summary>
        /// 入账客户号:入账客户号，由汇付生成，用户的唯一性标识
        /// </summary>
        [not]
        public string InCustId = "6000060000395843";
        /// <summary>
        /// 分账账户串
        /// </summary>
        public string DivDetails = "[{\"DivCustId\":\"6000060000353790\",\"DivAcctId\":\"MDT000001\",\"DivAmt\":\"0.01\"}]";
        //public string DivCustId = "";
        //public string DivAcctId = "";
        //public string DivAmt = "";
        /// <summary>
        /// 续费收取对象标志I/O
        /// </summary>
        public string FeeObjFlag = "O";
        /// <summary>
        /// 是否默认:Y--默认  N--不默认
        /// </summary>
        [not]
        public string IsDefault = "Y";
        /// <summary>
        /// 是否解冻:Y--解冻N--不解冻
        /// </summary>
        [not]
        public string IsUnFreeze = "Y";

        //解冻订单号，必须自己生成，后面不需要用到
        //我的数据库中，产生一个唯一标示。
        /// <summary>
        /// 解冻订单号
        /// </summary>
        public string UnFreezeOrdId = "";
        //这个必须是汇付返回的参数 //FreezeTrxId=201410200000242489

        //冻结标示。投标的时候返回的冻结标示
        /// <summary>
        /// 冻结标识
        /// </summary>
        public string FreezeTrxId = "201410200000242489";
        //public string BgRetUrl = "";
        /// <summary>
        /// 商户后台应答地址
        /// </summary>
        [not]
        public string BgRetUrl = "http://www.ieprint.com.cn/index";
        /// <summary>
        /// 商户私有域
        /// </summary>
        public string MerPriv = "";
        /// <summary>
        /// 入参扩展域
        /// </summary>
        public string ReqExt = "";
        /// <summary>
        /// 代金券金额
        /// </summary>
        [jine]
        public string VocherAmt = "";
        /// <summary>
        /// 项目 ID
        /// </summary>
        [not]
        public string ProId = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"Version
+CmdId + MerCustId + OrdId + OrdDate + OutCustId+ TransAmt+ Fee+ SubOrdId+ SubOrdDate+ InCustId+ DivDetails+FeeObjFlag+ IsDefault + IsUnFreeze+
UnFreezeOrdId+ FreezeTrxId + BgRetUrl+ MerPriv+ ReqExt";
    }

    /// <summary>
    /// 放贷返回信息，有些信息是需要存储的。 
    /// </summary>
    public class RetLoans
    {
        /// <summary>
        /// 消息类型:每一种消息类型代表一种交易，此处为 Loans
        /// </summary>
        [not]
        public string CmdId = "";
        /// <summary>
        /// 应答返回码:000--调用成功
        /// </summary>
        [not]
        public string RespCode = "";
        /// <summary>
        /// 应答描述:返回码的对应中文描述
        /// </summary>
        [not]
        public string RespDesc = "";
        /// <summary>
        /// 商户客户号:由汇付生成，商户的唯一性标识
        /// </summary>
        [not]
        public string MerCustId = "";
        /// <summary>
        /// 订单号:由商户的系统生成，必须保证唯一，请使用纯数字
        /// </summary>
        [not]
        public string OrdId = "";
        /// <summary>
        /// 订单日期:格式为 YYYYMMDD
        /// </summary>
        [not]
        public string OrdDate = "";
        /// <summary>
        /// 出账客户号:出账客户号，由汇付生成，用户的唯一性标识
        /// </summary>
        [not]
        public string OutCustId = "";
        /// <summary>
        /// 出账子账户:用户在汇付的虚拟资金账户号
        /// </summary>
        [not]
        public string OutAcctId = "";
        /// <summary>
        /// 交易金额
        /// </summary>
        [not]
        [jine]
        public string TransAmt = "";
        /// <summary>
        /// 扣款手续费:放款或扣款的手续费
        /// </summary>
        [not]
        [jine]
        public string Fee = "";
        /// <summary>
        /// 入账客户号:入账客户号，由汇付生成，用户的唯一性标识
        /// </summary>
        [not]
        public string InCustId = "";
        /// <summary>
        /// 入账子账户:用户在汇付的虚拟资金账户号
        /// </summary>
        public string InAcctId = "";
        /// <summary>
        /// 订单号
        /// </summary>
        [not]
        public string SubOrdId = "";
        /// <summary>
        /// 订单日期:格式为 YYYYMMDD
        /// </summary>
        [not]
        public string SubOrdDate = "";
        /// <summary>
        /// 续费收取对象标志I/O:I--向入款客户号 InCustId 收取
        ///                     O--向出款客户号 OutCustId 收取
        /// </summary>
        [not]
        public string FeeObjFlag = "";
        /// <summary>
        /// 是否默认:Y--默认添加资金池
        ///          N--不默认不添加资金池
        /// </summary>
        [not]
        public string IsDefault = "";
        /// <summary>
        /// 是否解冻:Y--解冻
        ///          N--不解冻
        /// </summary>
        [not]
        public string IsUnFreeze = "";
        /// <summary>
        /// 解冻订单号
        /// </summary>
        [not]
        public string UnFreezeOrdId = "";
        /// <summary>
        /// 冻结标识:8 位本平台日期+10 位系统流水号
        /// </summary>
        [not]
        public string FreezeTrxId = "";
        /// <summary>
        /// 商户后台应答地址
        /// </summary>
        [not]
        public string BgRetUrl = "";
        /// <summary>
        /// 商户私有域
        /// </summary>
        public string MerPriv = "";
        /// <summary>
        /// 返参扩展域
        /// </summary>
        public string RespExt = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = "CmdId + RespCode + MerCustId + OrdId + OrdDate + OutCustId + OutAcctId +TransAmt+ Fee+ InCustId + InAcctId +SubOrdId+ SubOrdDate+ FeeObjFlag+ IsDefault + IsUnFreeze + UnFreezeOrdId + FreezeTrxId + BgRetUrl + MerPriv + RespExt";
    }

    /// <summary>
    /// 自动还款 实时
    /// </summary>
    public class Repayment
    {
        /// <summary>
        /// 版本号:2.0 接口中此字段的值为 20，如版本升级，能向前兼容
        /// </summary>
        [not]
        public string Version = "20";
        /// <summary>
        /// 消息类型:每一种消息类型代表一种交易，此处为Repayment
        /// </summary>
        [not]
        public string CmdId = "Repayment";
        /// <summary>
        /// 商户客户号:由汇付生成，商户的唯一性标识
        /// </summary>
        [not]
        public string MerCustId = HuiFuArg.MerCustId;
        /// <summary>
        /// 订单号:由商户的系统生成，必须保证唯一，请使用纯数字
        /// </summary>
        [not]
        public string OrdId = core_huifu.getOrdId(huifu_lx.huankuan);
        /// <summary>
        /// 订单日期:格式为 YYYYMMDD
        /// </summary>
        [not]
        public string OrdDate = DateTime.Now.ToString("yyyyMMdd");
        /// <summary>
        /// 出账客户号:出账客户号，由汇付生成，用户的唯一性标识
        /// </summary>
        [not]
        public string OutCustId = "6000060000395843";//借款人

        //也是跟投标的时候 订单号和日期一致。
        /// <summary>
        /// 订单号
        /// </summary>
        [not]
        public string SubOrdId = "2000000001112222223";//投资订单号
        /// <summary>
        /// 订单日期:格式为 YYYYMMDD
        /// </summary>
        [not]
        public string SubOrdDate = "20130307";//投资日期
        /// <summary>
        /// 出账子账户:用户在汇付的虚拟资金账户号
        /// </summary>
        public string OutAcctId = "";
        /// <summary>
        /// 交易金额
        /// </summary>
        [not]
        [jine]
        public string TransAmt = "0.01";//反馈金额
        /// <summary>
        /// 扣款手续费:放款或扣款的手续费
        /// </summary>
        [not]
        [jine]
        public string Fee = "0.00";//费率为0
        /// <summary>
        /// 入账客户号
        /// </summary>
        [not]
        public string InCustId = "6000060000395530";//投资人
        /// <summary>
        /// 入账子账户
        /// </summary>
        public string InAcctId = "";
        /// <summary>
        /// 分账账户串
        /// </summary>
        public string DivDetails = "";
        /// <summary>
        /// 分账商户号
        /// </summary>
        [not]
        public string DivCustId = "";
        /// <summary>
        /// 分账账户号
        /// </summary>
        [not]
        public string DivAcctId = "";
        /// <summary>
        /// 分账金额
        /// </summary>
        [not]
        [jine]
        public string DivAmt = "";
        /// <summary>
        /// 续费收取对象标志I/O:I--向入款客户号 InCustId 收取
        ///                     O--向出款客户号 OutCustId 收取
        /// </summary>
        public string FeeObjFlag = "";
        /// <summary>
        /// 商户后台 应答地址
        /// </summary>
        [not]
        public string BgRetUrl = "";
        /// <summary>
        /// 商户私有域
        /// </summary>
        public string MerPriv = "";
        /// <summary>
        /// 入参扩展域
        /// </summary>
        public string ReqExt = "";
        /// <summary>
        /// 项目 ID
        /// </summary>
        [not]
        public string ProId = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"Version +CmdId + MerCustId + OrdId + OrdDate + OutCustId + SubOrdId+ SubOrdDate+ OutAcctId + TransAmt+ Fee+ InCustId+ InAcctId+ DivDetails+
FeeObjFlag+ BgRetUrl+ MerPriv + ReqExt
";

    }

    /// <summary>
    /// 返款返回值    
    /// </summary>
    public class RetRepayment
    {
        /// <summary>
        /// 消息类型:每一种消息类型代表一种交易，此处为Repayment
        /// </summary>
        [not]
        public string CmdId = "";
        /// <summary>
        /// 应答返回码:000--调用成功
        /// </summary>
        [not]
        public string RespCode = "";
        /// <summary>
        /// 应答描述:返回码的对应中文描述
        /// </summary>
        [not]
        public string RespDesc = "";
        /// <summary>
        /// 商户客户号:由汇付生成，商户的唯一性标识
        /// </summary>
        [not]
        public string MerCustId = "";
        /// <summary>
        /// 订单号:由商户的系统生成，必须保证唯一，请使用纯数字
        /// </summary>
        [not]
        public string OrdId = "";
        /// <summary>
        /// 订单日期:格式为 YYYYMMDD
        /// </summary>
        [not]
        public string OrdDate = "";
        /// <summary>
        /// 出账客户号
        /// </summary>
        [not]
        public string OutCustId = "";
        /// <summary>
        /// 订单号
        /// </summary>
        [not]
        public string SubOrdId = "";
        /// <summary>
        /// 订单日期
        /// </summary>
        [not]
        public string SubOrdDate = "";
        /// <summary>
        /// 出账子账户:用户在汇付的虚拟资金账户号
        /// </summary>
        [not]
        public string OutAcctId = "";
        /// <summary>
        /// 交易金额
        /// </summary>
        [not]
        [jine]
        public string TransAmt = "";
        /// <summary>
        /// 扣款手续费
        /// </summary>
        [not]
        [jine]
        public string Fee = "";
        /// <summary>
        /// 入账客户号
        /// </summary>
        [not]
        public string InCustId = "";
        /// <summary>
        /// 入账子账户
        /// </summary>
        public string InAcctId = "";
        /// <summary>
        /// 续费收取对象标志I/O:I--向入款客户号 InCustId 收取
        ///                     O--向出款客户号 OutCustId 收取
        /// </summary>
        public string FeeObjFlag = "";
        /// <summary>
        /// 商户后台应答地址
        /// </summary>
        [not]
        public string BgRetUrl = "";
        /// <summary>
        /// 商户私有域
        /// </summary>
        [not]
        public string MerPriv = "";
        /// <summary>
        /// 返参扩展域
        /// </summary>
        public string RespExt = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"CmdId + RespCode+ MerCustId + OrdId + OrdDate + OutCustId + SubOrdId+ SubOrdDate+ OutAcctId + TransAmt+ Fee
+ InCustId+ InAcctId+ FeeObjFlag + BgRetUrl+ MerPriv + RespExt";
    }


    /// <summary>
    /// 转账 商户用户 Web方式
    /// </summary>
    public class Transfer
    {
        /// <summary>
        /// 版本号:固定为 10，如版本升级，能向前兼容
        /// </summary>
        [not]
        public string Version = "10";
        /// <summary>
        /// 消息类型:每一种消息类型代表一种交易，此处为 Transfer
        /// </summary>
        [not]
        public string CmdId = "Transfer";
        /// <summary>
        /// 订单号:由商户的系统生成，必须保证唯一，请使用纯数字
        /// </summary>
        [not]
        public string OrdId = core_huifu.getOrdId(huifu_lx.zhuanzhuangshanghu);
        /// <summary>
        /// 出账客户号:出账客户号，由汇付生成，用户的唯一性标识
        /// </summary>
        [not]
        public string OutCustId = ConfigurationManager.AppSettings["MerCustId"];
        /// <summary>
        /// 出账子账户:用户在汇付的虚拟资金账户号
        /// </summary>
        [not]
        public string OutAcctId = "MDT000001";//这个必须填写
        /// <summary>
        /// 交易金额
        /// </summary>
        [not]
        [jine]
        public string TransAmt = "20.00";
        /// <summary>
        /// 入账客户号
        /// </summary>
        [not]
        public string InCustId = "6000060000395843";
        /// <summary>
        /// 入账子账户
        /// </summary>
        public string InAcctId = "";
        /// <summary>
        /// 页面返回 URL
        /// </summary>
        public string RetUrl = "";
        /// <summary>
        /// 商户后台 应答地址
        /// </summary>
        [not]
        public string BgRetUrl = "";
        /// <summary>
        /// 商户私有域
        /// </summary>
        public string MerPriv = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"Version +CmdId + OrdId + OutCustId + OutAcctId + TransAmt+ InCustId+ InAcctId+ RetUrl + BgRetUrl+ MerPriv";
    }


    /// <summary>
    /// 商户向用户转账返回信息
    /// </summary>
    public class RetTransfer
    {
        /// <summary>
        /// 消息类型:每一种消息类型代表一种交易，此处为 Transfer
        /// </summary>
        [not]
        public string CmdId = "";
        /// <summary>
        /// 应答返回码:000--调用成功
        /// </summary>
        [not]
        public string RespCode = "";
        /// <summary>
        /// 应答描述:返回码的对应中文描述
        /// </summary>
        [not]
        public string RespDesc = "";
        /// <summary>
        /// 订单号:由商户的系统生成，必须保证唯一，请使用纯数字
        /// </summary>
        [not]
        public string OrdId = "";
        /// <summary>
        /// 出账客户号:出账客户号，由汇付生成，用户的唯一性标识
        /// </summary>
        [not]
        public string OutCustId = "";
        /// <summary>
        /// 出账子账户:用户在汇付的虚拟资金账户号
        /// </summary>
        [not]
        public string OutAcctId = "";
        /// <summary>
        /// 交易金额
        /// </summary>
        [not]
        [jine]
        public string TransAmt = "";
        /// <summary>
        /// 入账客户号:入账客户号，由汇付生成，用户的唯一性标识
        /// </summary>
        [not]
        public string InCustId = "";
        /// <summary>
        /// 入账子账户:用户在汇付的虚拟资金账户号
        /// </summary>
        public string InAcctId = "";
        /// <summary>
        /// 页面返回 URL
        /// </summary>
        public string RetUrl = "";
        /// <summary>
        /// 商户后台 应答地址
        /// </summary>
        [not]
        public string BgRetUrl = "";
        /// <summary>
        /// 商户私有域
        /// </summary>
        public string MerPriv = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = "CmdId + RespCode +OrdId + OutCustId + OutAcctId + TransAmt+ InCustId+ InAcctId+RetUrl + BgRetUrl+ MerPriv";

    }

    /// <summary>
    /// 取现
    /// </summary>
    public class Cash
    {
        /// <summary>
        /// 版本号:2.0 接口中此字段的值为 20，如版本升级，能向前兼容
        /// </summary>
        [not]
        public string Version = "20";
        /// <summary>
        /// 消息类型:每一种消息类型代表一种交易，此处为 Cash
        /// </summary>
        [not]
        public string CmdId = "Cash";
        /// <summary>
        /// 商户客户号:由汇付生成，商户的唯一性标识
        /// </summary>
        [not]
        public string MerCustId = HuiFuArg.MerCustId;
        /// <summary>
        /// 订单号:由商户的系统生成，必须保证唯一，请使用纯数字
        /// </summary>
        [not]
        public string OrdId = core_huifu.getOrdId(huifu_lx.tixian);
        /// <summary>
        /// 用户客户号:由汇付生成，用户的唯一性标识
        /// </summary>
        [not]
        public string UsrCustId = "6000060000395530";
        /// <summary>
        /// 交易金额
        /// </summary>
        [not]
        [jine]
        public string TransAmt = "10.00";
        /// <summary>
        /// 商户收取服务费金额:商户收取用户的服务费
        /// </summary>
        [jine]
        public string ServFee = "";
        /// <summary>
        /// 商户子账户号:商户用来收取服务费的子账户号
        /// </summary>
        public string ServFeeAcctId = "";
        /// <summary>
        /// 开户银行账号:取现银行的账户号（银行卡号）
        /// </summary>
        public string OpenAcctId = "";
        /// <summary>
        /// 页面返回 URL
        /// </summary>
        public string RetUrl = "";
        /// <summary>
        /// 商户后台应答地址
        /// </summary>
        [not]
        public string BgRetUrl = "";
        /// <summary>
        /// 备注
        /// </summary>
        public string Remark = "";
        /// <summary>
        /// 编码集
        /// </summary>
        public string CharSet = "";
        /// <summary>
        /// 商户私有域
        /// </summary>
        public string MerPriv = "";
        /// <summary>
        /// 入参扩展域
        /// </summary>
        public string ReqExt = "";
        /// <summary>
        /// 手续费收取对象
        /// </summary>
        public string FeeObjFlag = "";
        /// <summary>
        /// 手续费收取子账户:FeeObjFlag=M.必填
        ///                  FeeObjFlag=U.忽略
        /// </summary>
        public string FeeAcctId = "";
        /// <summary>
        /// 取现渠道:FAST 快速取现;GENERAL 一般取现; IMMEDIATE 即时取现
        /// </summary>
        public string CashChl = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"Version +CmdId + MerCustId+ OrdId +UsrCustId + TransAmt+ ServFee+
ServFeeAcctId +OpenAcctId + RetUrl + BgRetUrl+ Remark+ MerPriv + ReqExt";

    }
    /// <summary>
    /// 取现 同步异步返回参数列表
    /// </summary>
    public class RetCash
    {
        /// <summary>
        /// 消息类型:每一种消息类型代表一种交易，此处为 Cash
        /// </summary>
        [not]
        public string CmdId = "";
        /// <summary>
        /// 应答返回码:000--调用成功
        /// </summary>
        [not]
        public string RespCode = "";
        /// <summary>
        /// 应答描述:返回码的对应中文描述
        /// </summary>
        [not]
        public string RespDesc = "";
        /// <summary>
        /// 商户客户号:由汇付生成，商户的唯一性标识
        /// </summary>
        [not]
        public string MerCustId = "";
        /// <summary>
        /// 订单号:由商户的系统生成，必须保证唯一，请使用纯数字
        /// </summary>
        [not]
        public string OrdId = "";
        /// <summary>
        /// 用户客户号:由汇付生成，用户的唯一性标识
        /// </summary>
        [not]
        public string UsrCustId = "";
        /// <summary>
        /// 交易金额
        /// </summary>
        [not]
        [jine]
        public string TransAmt = "";
        /// <summary>
        /// 开户银行账号:取现银行的账户号（银行卡号）
        /// </summary>
        public string OpenAcctId = "";
        /// <summary>
        /// 开户银行代号
        /// </summary>
        public string OpenBankId = "";
        /// <summary>
        /// 手续费金额:取现手续费+垫资手续费
        /// </summary>
        [not]
        [jine]
        public string FeeAmt = "";
        /// <summary>
        /// 手续费扣款客户号
        /// </summary>
        [not]
        public string FeeCustId = "";
        /// <summary>
        /// 手续费扣款子账户号
        /// </summary>
        [not]
        public string FeeAcctId = "";
        /// <summary>
        /// 商户收取服务费金额
        /// </summary>
        public string ServFee = "";
        /// <summary>
        /// 商户子账户号
        /// </summary>
        public string ServFeeAcctId = "";
        /// <summary>
        /// 页面返回 URL
        /// </summary>
        public string RetUrl = "";
        /// <summary>
        /// 商户后台 应答地址
        /// </summary>
        [not]
        public string BgRetUrl = "";
        /// <summary>
        /// 商户私有域
        /// </summary>
        public string MerPriv = "";
        /// <summary>
        /// 返参扩展域
        /// </summary>
        public string RespExt = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"CmdId+ RespCode + MerCustId + OrdId +
UsrCustId + TransAmt + OpenAcctId + OpenBankId + FeeAmt+ FeeCustId+FeeAcctId +ServFee + ServFeeAcctId +RetUrl+BgRetUrl+ MerPriv+ RespExt";
    }


    /// <summary>
    /// 商户代取现
    /// </summary>
    public class MerCash
    {
        /// <summary>
        /// 版本号:2.0 接口中此字段的值为 20，如版本升级，能向前兼容
        /// </summary>
        [not]
        public string Version = "20";
        /// <summary>
        /// 消息类型:每一种消息类型代表一种交易，此处为 MerCash
        /// </summary>
        [not]
        public string CmdId = "MerCash";
        /// <summary>
        /// 商户客户号:由汇付生成，商户的唯一性标识
        /// </summary>
        [not]
        public string MerCustId = HuiFuArg.MerCustId;
        /// <summary>
        /// 订单号:由商户的系统生成，必须保证唯一，请使用纯数字
        /// </summary>
        [not]
        public string OrdId = core_huifu.getOrdId(huifu_lx.tixianshanghu);
        /// <summary>
        /// 用户客户号:由汇付生成，用户的唯一性标识
        /// </summary>
        [not]
        public string UsrCustId = "6000060000395530";
        /// <summary>
        /// 交易金额
        /// </summary>
        [not]
        [jine]
        public string TransAmt = "10.00";
        /// <summary>
        /// 商户收取服务费金额
        /// </summary>        
        [jine]
        public string ServFee = "";
        /// <summary>
        /// 商户子账户号:商户用来收取服务费的子账户号
        /// </summary>
        public string ServFeeAcctId = "";
        /// <summary>
        /// 页面返回 URL
        /// </summary>
        public string RetUrl = "";
        /// <summary>
        /// 商户后台应答地址
        /// </summary>
        [not]
        public string BgRetUrl = "";
        /// <summary>
        /// 备注
        /// </summary>
        public string Remark = "";
        /// <summary>
        /// 编码集
        /// </summary>
        public string CharSet = "";
        /// <summary>
        /// 商户私有域
        /// </summary>
        public string MerPriv = "";
        /// <summary>
        /// 入参扩展域
        /// </summary>
        public string ReqExt = "";
        /// <summary>
        /// 手续费收取对象
        /// </summary>
        public string FeeObjFlag = "";
        /// <summary>
        /// 手续费收取子账户:FeeObjFlag=M.必填
        ///                  FeeObjFlag=U.忽略
        /// </summary>
        public string FeeAcctId = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"Version +CmdId + MerCustId+ OrdId +UsrCustId + TransAmt+ ServFee+
ServFeeAcctId + RetUrl + BgRetUrl+ Remark+ MerPriv + ReqExt";

    }
    /// <summary>
    /// 商户代取现 同步异步返回参数列表
    /// </summary>
    public class RetMerCash
    {
        /// <summary>
        /// 消息类型:每一种消息类型代表一种交易，此处为 MerCash
        /// </summary>
        [not]
        public string CmdId = "";
        /// <summary>
        /// 应答返回码:000--调用成功
        /// </summary>
        [not]
        public string RespCode = "";
        /// <summary>
        /// 应答描述:返回码的对应中文描述
        /// </summary>
        [not]
        public string RespDesc = "";
        /// <summary>
        /// 商户客户号:由汇付生成，商户的唯一性标识
        /// </summary>
        [not]
        public string MerCustId = "";
        /// <summary>
        /// 订单号:由商户的系统生成，必须保证唯一，请使用纯数字
        /// </summary>
        [not]
        public string OrdId = "";
        /// <summary>
        /// 用户客户号:由汇付生成，用户的唯一性标识
        /// </summary>
        [not]
        public string UsrCustId = "";
        /// <summary>
        /// 交易金额
        /// </summary>
        [not]
        [jine]
        public string TransAmt = "";
        /// <summary>
        /// 开户银行账号:取现银行的账户号（银行卡号）
        /// </summary>
        public string OpenAcctId = "";
        /// <summary>
        /// 开户银行代号
        /// </summary>
        public string OpenBankId = "";
        /// <summary>
        /// 手续费金额:取现手续费+垫资手续费
        /// </summary>
        [not]
        [jine]
        public string FeeAmt = "";
        /// <summary>
        /// 手续费扣款客户号
        /// </summary>
        [not]
        public string FeeCustId = "";
        /// <summary>
        /// 手续费扣款子账户号
        /// </summary>
        [not]
        public string FeeAcctId = "";
        /// <summary>
        /// 商户收取服务费金额:商户收取用户的服务费	
        /// </summary>
        [jine]
        public string ServFee = "";
        /// <summary>
        /// 商户子账户号:商户用来收取服务费的子账户号
        /// </summary>
        public string ServFeeAcctId = "";
        /// <summary>
        /// 页面返回 URL
        /// </summary>
        public string RetUrl = "";
        /// <summary>
        /// 商户后台应答地址
        /// </summary>
        [not]
        public string BgRetUrl = "";
        /// <summary>
        /// 商户私有域
        /// </summary>
        public string MerPriv = "";
        /// <summary>
        /// 返参扩展域
        /// </summary>
        public string RespExt = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"CmdId+ RespCode + MerCustId + OrdId +
UsrCustId + TransAmt + OpenAcctId + OpenBankId + FeeAmt+ FeeCustId+FeeAcctId +ServFee + ServFeeAcctId +RetUrl+BgRetUrl+ MerPriv+ RespExt";
    }




    /// <summary>
    /// 取现复核
    /// </summary>
    public class CashAudit
    {
        /// <summary>
        /// 版本号:固定为 10，如版本升级，能向前兼容
        /// </summary>
        [not]
        public string Version = "10";
        /// <summary>
        /// 消息类型:每一种消息类型代表一种交易，此处为 CashAudit
        /// </summary>
        [not]
        public string CmdId = "CashAudit";
        /// <summary>
        /// 商户客户号:由汇付生成，商户的唯一性标识
        /// </summary>
        [not]
        public string MerCustId = HuiFuArg.MerCustId;
        /// <summary>
        /// 订单号:由商户的系统生成，必须保证唯一，请使用纯数字
        /// </summary>
        [not]
        public string OrdId = core_huifu.getOrdId(huifu_lx.tixianfuhe);
        /// <summary>
        /// 用户客户号:由汇付生成，用户的唯一性标识
        /// </summary>
        [not]
        public string UsrCustId = "6000060000395530";
        /// <summary>
        /// 交易金额
        /// </summary>
        [not]
        [jine]
        public string TransAmt = "10.00";
        /// <summary>
        /// 复核标识:R--拒绝
        ///          S--复核通过
        /// </summary>
        [not]
        public string AuditFlag = "S"; //复核标识 R 拒绝 S通过
        /// <summary>
        /// 页面返回 URL
        /// </summary>
        public string RetUrl = "";
        /// <summary>
        /// 商户后台 应答地址
        /// </summary>
        [not]
        public string BgRetUrl = "";
        /// <summary>
        /// 商户私有域
        /// </summary>
        public string MerPriv = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"Version +CmdId + MerCustId+ OrdId +UsrCustId + TransAmt+ AuditFlag+ RetUrl + BgRetUrl+ MerPriv ";

    }
    /// <summary>
    /// 取现复核 返回参数
    /// </summary>
    public class RetCashAudit
    {
        /// <summary>
        /// 消息类型:每一种消息类型代表一种交易，此处为 CashAudit
        /// </summary>
        [not]
        public string CmdId = "";
        /// <summary>
        /// 应答返回码:000--调用成功
        ///            999--处理中
        /// </summary>
        [not]
        public string RespCode = "";
        /// <summary>
        /// 应答描述:返回码的对应中文描述
        /// </summary>
        [not]
        public string RespDesc = "";
        /// <summary>
        /// 商户客户号:由汇付生成，商户的唯一性标识
        /// </summary>
        [not]
        public string MerCustId = "";
        /// <summary>
        /// 订单号:由商户的系统生成，必须保证唯一，请使用纯数字
        /// </summary>
        [not]
        public string OrdId = "";
        /// <summary>
        /// 用户客户号:由汇付生成，用户的唯一性标识
        /// </summary>
        [not]
        public string UsrCustId = "";
        /// <summary>
        /// 交易金额
        /// </summary>
        [not]
        [jine]
        public string TransAmt = "";
        /// <summary>
        /// 开户银行账号:取现银行的账户号（银行卡号）
        /// </summary>
        public string OpenAcctId = "";
        /// <summary>
        /// 开户银行代号
        /// </summary>
        public string OpenBankId = "";
        /// <summary>
        /// 复核标识
        /// </summary>
        [not]
        public string AuditFlag = ""; //复核标识 R 拒绝 S通过
        /// <summary>
        /// 手续费金额:取现手续费+垫资手续费
        /// </summary>
        [not]
        [jine]
        public string FeeAmt = "";
        /// <summary>
        /// 手续费扣款客户号
        /// </summary>
        [not]
        public string FeeCustId = "";
        /// <summary>
        /// 手续费扣款子账户号
        /// </summary>
        [not]
        public string FeeAcctId = "";
        /// <summary>
        /// 页面返回 URL
        /// </summary>
        public string RetUrl = "";
        /// <summary>
        /// 商户后台 应答地址
        /// </summary>
        [not]
        public string BgRetUrl = "";
        /// <summary>
        /// 商户私有域
        /// </summary>
        public string MerPriv = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"CmdId+ RespCode + MerCustId + OrdId +
UsrCustId + TransAmt + OpenAcctId + OpenBankId +AuditFlag+ RetUrl+BgRetUrl+ MerPriv";
    }


    /// <summary>
    /// 异步对账返回参数列表
    /// </summary>
    public class RetCash2
    {
        public string RespType = "";
        public string RespCode = "";
        public string RespDesc = "";
        public string MerCustId = "";
      
        public string OrdId = core_huifu.getOrdId(huifu_lx.duizhangyibu);
        public string UsrCustId = "";
        public string TransAmt = "";
        public string OpenAcctId = "";
        public string OpenBankId = "";

        public string RetUrl = "";
        public string BgRetUrl = "";
        public string MerPriv = "";
        public string RespExt = "";
        public string ChkValue = "";

    }

    /// <summary>
    /// 余额查询 页面调用方式
    /// </summary>
    public class QueryBalance
    {
        /// <summary>
        /// 版本号
        /// </summary>
        [not]
        public string Version = "10";
        /// <summary>
        /// 消息类型
        /// </summary>
        [not]
        public string CmdId = "QueryBalance";
        /// <summary>
        /// 商户客号
        /// </summary>
        [not]
        public string MerCustId = "";
        /// <summary>
        /// 用户客号
        /// </summary>
        [not]
        public string UsrCustId = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"Version+CmdId
+ MerCustId + UsrCustId";

    }

    /// <summary>
    /// 后台查询显示方式
    /// </summary>
    public class QueryBalanceBg
    {
        /// <summary>
        /// 版本号:目前固定为 10 ，如版本升级 ，能向前兼容
        /// </summary>
        [not]
        public string Version = "10";
        /// <summary>
        /// 消息类型:每一种消息类型代表交易 ，此处为QueryBalanceBg
        /// </summary>
        [not]
        public string CmdId = "QueryBalanceBg";
        /// <summary>
        /// 商户客号:由汇付生成 ，商户的唯一性标识
        /// </summary>
        [not]
        public string MerCustId = HuiFuArg.MerCustId;
        /// <summary>
        /// 用户客号:由汇付生成 ，用户的唯一性标识
        /// </summary>
        [not]
        public string UsrCustId = "6000060000395530";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"Version+CmdId
+ MerCustId + UsrCustId";

    }

    /// <summary>
    /// 后台实时返回查询余额
    /// </summary>
    public class RetQueryBalanceBg
    {
        /// <summary>
        /// 消息类型每一种消息类型代表交易 ，此处为 QueryBalanceBg
        /// </summary>
        [not]
        public string CmdId = "";
        /// <summary>
        /// 应答返回码:000调用成功
        /// </summary>
        [not]
        public string RespCode = "";
        /// <summary>
        /// 应答描述
        /// </summary>
        [not]
        public string RespDesc = "";
        /// <summary>
        /// 商户客号:由汇付生成 ，商户的唯一性标识
        /// </summary>
        [not]
        public string MerCustId = "";
        /// <summary>
        /// 用户客号:由汇付生成 ，用户的唯一性标识
        /// </summary>
        [not]
        public string UsrCustId = "";
        /// <summary>
        /// 可用余额:账户可以支取的余额
        /// </summary>
        public string AvlBal = "";
        /// <summary>
        /// 账户余额:账户资金余额 ，该余额能真正反映账户的资金量
        /// </summary>
        public string AcctBal = "";
        /// <summary>
        /// 冻结余额
        /// </summary>
        public string FrzBal = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"CmdId+RespCode+MerCustId+ UsrCustId+
AvlBal+ AcctBal+ FrzBal";

    }

    /// <summary>
    /// 商户子账户信息查询  后台实时返回
    /// </summary>
    public class QueryAccts
    {
        /// <summary>
        /// 版本号:目前固定为 10 ，如版本升级能向前兼容
        /// </summary>
        [not]
        public string Version = "10";
        /// <summary>
        /// 消息类型:每一种消息类型代表交易 ，此处为 QueryAccts
        /// </summary>
        [not]
        public string CmdId = "";
        /// <summary>
        /// 商户客户号：由汇付生成，商户的唯一性标识
        /// </summary>
        [not]
        public string MerCustId = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"Version
+CmdId + MerCustId";

    }

    /// <summary>
    /// 实时返回信息
    /// </summary>
    public class RetQueryAccts
    {
        /// <summary>
        /// 消息类型:每一种消息类型代表交易 ，此处为 QueryAccts
        /// </summary>
        [not]
        public string CmdId = "";
        /// <summary>
        /// 应答返回码:000调用成功
        /// </summary>
        [not]
        public string RespCode = "";
        /// <summary>
        /// 应答描述
        /// </summary>
        [not]
        public string RespDesc = "";
        /// <summary>
        /// 商户客号:由汇付生成，商户的唯一性标识
        /// </summary>
        [not]
        public string MerCustId = "";
        /// <summary>
        /// 账务结果串
        /// </summary>
        public string AcctDetails = "";
        /// <summary>
        /// 可用余额:参数 AcctDetails 的二级参数,账户可以支取的余额
        /// </summary>
        [not]
        public string AvlBal = "";
        /// <summary>
        /// 账户余额:参数 AcctDetails 的二级参数，账户资金余额，该余额能真正反映账户的资金量
        /// </summary>
        [not]
        public string AcctBal = "";
        /// <summary>
        /// 冻结余额：参数 AcctDetails 的二级参数，账户资金余额，冻结余额
        /// </summary>
        [not]
        public string FrzBal = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = "CmdId  + RespCode+ MerCustId";

    }

    /// <summary>
    /// 交易状态查询 实时返回
    /// </summary>
    public class QueryTransStat
    {
        /// <summary>
        /// 版本号:目前固定为 10 ，如版本升级能向前兼容
        /// </summary>
        [not]
        public string Version = "10";
        /// <summary>
        /// 消息类型:每一种消息类型代表交易，此处为QueryTransStat
        /// </summary>
        [not]
        public string CmdId = "QueryTransStat";
        /// <summary>
        /// 商户客户号：由汇付生成，商户的唯一性标识
        /// </summary>
        [not]
        public string MerCustId = "";
        /// <summary>
        /// 订单日期:格式为 YYYYMMDD
        /// </summary>
        [not]
        public string OrdDate = DateTime.Now.ToString("yyyyMMdd");
        /// <summary>
        /// 订单号:由商户的系统生成 ，必须保证唯一 ，请使用纯数字
        /// </summary>
        public string OrdId = core_huifu.getOrdId(huifu_lx.chaxunjiaoyizhuangtai);
        /// <summary>
        /// 交易查询类型:LOANS ：放款交易查询 
        ///              REPAYMENT ：还款交易查 
        ///              TENDER ：投标交易查询 
        ///              CASH CASH：取现交易查询 
        /// </summary>
        [not]
        public string QueryTransType = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"Version+CmdId+MerCustId+OrdId+
OrdDate+ QueryTransType";

    }

    /// <summary>
    /// 交易状态查询 实时返回 返回信息
    /// </summary>
    public class RetQueryTransStat
    {
        /// <summary>
        /// 消息类型:每一种消息类型代表交易 ，此处为QueryTransStat
        /// </summary>
        [not]
        public string CmdId = "";
        /// <summary>
        /// 应答返回码:000 -- 调用成功
        /// </summary>
        [not]
        public string RespCode = "";
        /// <summary>
        /// 应答描述
        /// </summary>
        [not]
        public string RespDesc = "";
        /// <summary>
        /// 商户客号:由汇付生成 ，商户的唯一性标识
        /// </summary>
        [not]
        public string MerCustId = "";
        /// <summary>
        /// 订单号:由商户的系统生成 ，必须保证唯一 ，请使用纯数字
        /// </summary>
        [not]
        public string OrdId = "";
        /// <summary>
        /// 订单日期:格式为 YYYYMMDD
        /// </summary>
        [not]
        public string OrdDate = "";
        /// <summary>
        /// 交易查询类型
        /// </summary>
        [not]
        public string QueryTransType = "";
        /// <summary>
        /// 汇付交易状态:S-- 成功
        ///              F-- 失败
        ///              I-- 初始
        ///              P-- 部分成功
        ///              H-- 经办
        /// </summary>
        public string TransStat = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"CmdId+
RespCode + MerCustId+ OrdId+ OrdDate+
QueryTransType + TransStat";

    }

    /// <summary>
    /// 商户扣款对账 后台实时返回
    /// </summary>
    public class TrfReconciliation
    {
        /// <summary>
        /// 版本号:目前固定为 10，如版本升级，能向前兼容
        /// </summary>
        [not]
        public string Version = "10";
        /// <summary>
        /// 消息类型:每一种消息类型代表一种交易，此处为 TrfReconciliation
        /// </summary>
        [not]
        public string CmdId = "TrfReconciliation";
        /// <summary>
        /// 商户客户号:由汇付生成，商户的唯一性标识
        /// </summary>
        [not]
        public string MerCustId = "";
        /// <summary>
        /// 开始时间:YYYYMMDD 格式 BeginDate 和 EndDate 日期跨度不能大于 90 天
        /// </summary>
        [not]
        public string BeginDate = "";
        /// <summary>
        /// 结束时间:YYYYMMDD 格式 BeginDate 和 EndDate 日期跨度不能大于 90 天
        /// </summary>
        [not]
        public string EndDate = "";
        /// <summary>
        /// 页数:查询数据的所在页号,>0 的整数
        /// </summary>
        [not]
        public string PageNum = "";
        /// <summary>
        /// 每页记录数:查询数据的所在页号，>0 且<=1000 的整数
        /// </summary>
        [not]
        public string PageSize = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"Version+CmdId+MerCustId+BeginDate+
EndDate+PageNum+PageSize";

    }

    /// <summary>
    /// 商户扣款对账 返回信息
    /// </summary>
    public class RetTrfReconciliation
    {
        /// <summary>
        /// 消息类型:每一种消息类型代表一种交易，此处为 TrfReconciliation
        /// </summary>
        [not]
        public string CmdId = "";
        /// <summary>
        /// 应答返回码:000--调用成功
        /// </summary>
        [not]
        public string RespCode = "";
        /// <summary>
        /// 应答描述:返回码的对应中文描述
        /// </summary>
        [not]
        public string RespDesc = "";
        /// <summary>
        /// 商户客户号:参数 ReconciliationDtoList 的二级参数由汇付生成，商户的唯一性标识
        /// </summary>
        [not]
        public string MerCustId = "";
        /// <summary>
        /// 开始时间:YYYYMMDD 格式 BeginDate 和 EndDate 日期跨度不能大于 90 天
        /// </summary>
        [not]
        public string BeginDate = "";
        /// <summary>
        /// 结束时间:YYYYMMDD 格式 BeginDate 和 EndDate 日期跨度不能大于 90 天
        /// </summary>
        [not]
        public string EndDate = "";
        /// <summary>
        /// 页数:查询数据的所在页号，>0 的整数
        /// </summary>
        [not]
        public string PageNum = "";
        /// <summary>
        /// 每页记录数:查询数据的所在页号，>0 且<=1000 的整数
        /// </summary>
        [not]
        public string PageSize = "";
        /// <summary>
        /// 记录总条数:查询数据的所在页号，>0 的整数
        /// </summary>
        [not]
        public string TotalItems = "";
        /// <summary>
        /// 对账结果串
        /// </summary>
        public string ReconciliationDtoList = "";
        /// <summary>
        /// 订单号:参数 ReconciliationDtoList 的二级参数由商户的系统生成，必须保证唯一，请使用纯数字
        /// </summary>
        [not]
        public string OrdId = "";
        /// <summary>
        /// 用户客户号:参数 ReconciliationDtoList 的二级参数由汇付生成，用户的唯一性标识
        /// </summary>
        [not]
        public string UsrCustId = "";
        /// <summary>
        /// 交易金额
        /// </summary>
        [not]
        [jine]
        public string TransAmt = "";
        /// <summary>
        /// 汇付交易状态:参数 ReconciliationDtoList 的二级参数
        ///              汇付交易状态
        ///              S--成功
        ///              F--失败
        ///              I--初始
        /// </summary>
        [not]
        public string TransStat = "";
        /// <summary>
        /// 汇付交易日期:	参数 ReconciliationDtoList 的二级参数YYYYMMDD 格式
        /// </summary>
        [not]
        public string PnrDate = "";
        /// <summary>
        /// 汇付交易流水:参数 ReconciliationDtoList 的二级参数汇付交易流水
        /// </summary>
        [not]
        public string PnrSeqId = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = "CmdId+RespCode+MerCustId+ BeginDate+EndDate+PageNum+PageSize+TotalItems";
    }

    /// <summary>
    /// 查询投资情况
    /// </summary>
    public class QueryTenderPlan
    {
        /// <summary>
        /// 版本号:目前固定为 10 ，如版本升级 ，能向前兼容
        /// </summary>
        [not]
        public string Version = "10";
        /// <summary>
        /// 消息类型:每一种消息类型代表交易 ，此处为 QueryTenderPlan
        /// </summary>
        [not]
        public string CmdId = "QueryTenderPlan";
        /// <summary>
        /// 商户客号:由汇付生成 ，商户的唯一性标识
        /// </summary>
        [not]
        public string MerCustId = "";
        /// <summary>
        /// 用户客号:由汇付生成 ，用户的唯一性标识
        /// </summary>
        [not]
        public string UsrCustId = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = "Version+CmdId+MerCustId+UsrCustId";

    }

    /// <summary>
    /// 查询投资情况返回记录
    /// </summary>
    public class RetQueryTenderPlan
    {
        /// <summary>
        /// 消息类型:每一种消息类型代表交易 ，此处为 QueryTenderPlan
        /// </summary>
        [not]
        public string CmdId = "QueryTenderPlan";
        /// <summary>
        /// 应答返回码:000 -- 调用成功
        /// </summary>
        [not]
        public string RespCode = "";
        /// <summary>
        /// 应答描述
        /// </summary>
        [not]
        public string RespDesc = "";
        /// <summary>
        /// 商户客号:由汇付生成 ，商户的唯一性标识
        /// </summary>
        [not]
        public string MerCustId = "";
        /// <summary>
        /// 用户客号:由汇付生成 ，用户的唯一性标识
        /// </summary>
        [not]
        public string UsrCustId = "";
        /// <summary>
        /// 汇付交易状态:S-- 成功
        ///              F-- 失败
        ///              I-- 初始
        ///              P-- 部分成功
        ///              H-- 经办
        ///              R-- 拒绝
        /// </summary>
        public string TransStat = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"CmdId+RespCode+MerCustId+ UsrCustId+TransStat";

    }

    /// <summary>
    /// 放还款对账 后台实时返回
    /// </summary>
    public class Reconciliation
    {
        /// <summary>
        /// 版本号:目前固定为 10，如版本升级，能向前兼容
        /// </summary>
        [not]
        public string Version = "10";
        /// <summary>
        /// 消息类型:每 一 种 消 息 类 型 代 表 一 种 交 易 ， 此 处 为 Reconciliation
        /// </summary>
        [not]
        public string CmdId = "Reconciliation";
        /// <summary>
        /// 商户客户号:由汇付生成，商户的唯一性标识
        /// </summary>
        [not]
        public string MerCustId = "";
        /// <summary>
        /// 开始时间:YYYYMMDD 格式 BeginDate 和 EndDate 日期跨度不能大于 90 天
        /// </summary>
        [not]
        public string BeginDate = "";
        /// <summary>
        /// 结束时间:YYYYMMDD 格式 BeginDate 和 EndDate 日期跨度不能大于 90 天
        /// </summary>
        [not]
        public string EndDate = "";
        /// <summary>
        /// 页数:查询数据的所在页号，>0 的整数
        /// </summary>
        [not]
        public string PageNum = "";
        /// <summary>
        /// 每页记录数:查询数据的所在页号，>0 且<=1000 的整数
        /// </summary>
        [not]
        public string PageSize = "";
        /// <summary>
        /// 交易查询类型;LOANS：放款交易查询 REPAYMENT：还款交易查询
        /// </summary>
        [not]
        public string QueryTransType = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = "Version+CmdId+MerCustId+BeginDate+ EndDate+PageNum+PageSize+QueryTransType";

    }

    /// <summary>
    /// 放还款对账返回信息
    /// </summary>
    public class RetReconciliation
    {
        /// <summary>
        /// 消息类型:每一种消息类型代表一种交易，此处为 Reconciliation
        /// </summary>
        [not]
        public string CmdId = "Reconciliation";
        /// <summary>
        /// 应答返回码:000--调用成功
        /// </summary>
        [not]
        public string RespCode = "";
        /// <summary>
        /// 应答描述:返回码的对应中文描述
        /// </summary>
        [not]
        public string RespDesc = "";
        /// <summary>
        /// 商户客户号:由汇付生成，商户的唯一性标识
        /// </summary>
        [not]
        public string MerCustId = "";
        /// <summary>
        /// 开始时间:YYYYMMDD 格式 BeginDate 和 EndDate 日期跨度不能大于 90 天
        /// </summary>
        [not]
        public string BeginDate = "";
        /// <summary>
        /// 结束时间:YYYYMMDD 格式 BeginDate 和 EndDate 日期跨度不能大于 90 天
        /// </summary>
        [not]
        public string EndDate = "";
        /// <summary>
        /// 页数:查询数据的所在页号，>0 的整数
        /// </summary>
        [not]
        public string PageNum = "";
        /// <summary>
        /// 每页记录数:查询数据的所在页号，>0 且<=1000 的整数
        /// </summary>
        [not]
        public string PageSize = "";
        /// <summary>
        /// 记录总条数:查询数据的所在页号，>0 的整数
        /// </summary>
        [not]
        public string TotalItems = "";
        /// <summary>
        /// 交易查询类型:LOANS：放款交易查询 REPAYMENT：还款交易查询
        /// </summary>
        [not]
        public string QueryTransType = "";
        /// <summary>
        /// 对账结果串
        /// </summary>
        public string ReconciliationDtoList = "";
        /// <summary>
        /// 订单号:参数 ReconciliationDtoList 的二级参数由商户的系统生成，必须保证唯一，请使用纯数字
        /// </summary>
        [not]
        public string OrdId = "";
        /// <summary>
        /// 订单日期:参数 ReconciliationDtoList 的二级参数格式为 YYYYMMDD
        /// </summary>
        [not]
        public string OrdDate = "";
        /// <summary>
        /// 投资人客户号:参数 ReconciliationDtoList 的二级参数投资人客户号，由汇付生成，用户的唯一性标识
        /// </summary>
        [not]
        public string InvestCustId = "";
        /// <summary>
        /// 借款人客户号:参数 ReconciliationDtoList 的二级参数借款人客户号，由汇付生成，用户的唯一性标识
        /// </summary>
        [not]
        public string BorrCustId = "";
        /// <summary>
        /// 交易金额
        /// </summary>
        [not]
        [jine]
        public string TransAmt = "";
        /// <summary>
        /// 汇付交易状态:参数 ReconciliationDtoList 的二级参数
        ///              I--初始
        ///              P--部分成功
        /// </summary>
        [not]
        public string TransStat = "";
        /// <summary>
        /// 汇付交易日期:参数 ReconciliationDtoList 的二级参数YYYYMMDD 格式
        /// </summary>
        [not]
        public string PnrDate = "";
        /// <summary>
        /// 汇付交易流水:参数 ReconciliationDtoList 的二级参数汇付交易流水
        /// </summary>
        [not]
        public string PnrSeqId = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"CmdId+RespCode+MerCustId+ BeginDate+EndDate+PageNum+PageSize+TotalItems+ QueryTransType";
    }

    /// <summary>
    /// 取现对账 取现对账
    /// </summary>
    public class CashReconciliation
    {
        /// <summary>
        /// 版本号:2.0 接口中此字段的值为 20。如版本升级，能向前兼容
        /// </summary>
        [not]
        public string Version = "20";
        /// <summary>
        /// 消息类型:每 一 种 消 息  类 型 代 表  一 种 交 易  ， 此 处 为 CashReconciliation
        /// </summary>
        [not]
        public string CmdId = "CashReconciliation";
        /// <summary>
        /// 商户客户号:由汇付生成，商户的唯一性标识
        /// </summary>
        [not]
        public string MerCustId = "";
        /// <summary>
        /// 开始时间:YYYYMMDD 格式 BeginDate 和 EndDate 日期跨度不能大于 90 天
        /// </summary>
        [not]
        public string BeginDate = "";
        /// <summary>
        /// 结束时间:YYYYMMDD 格式 BeginDate 和 EndDate 日期跨度不能大于 90 天
        /// </summary>
        [not]
        public string EndDate = "";
        /// <summary>
        /// 页数:查询数据的所在页号，>0 的整数
        /// </summary>
        [not]
        public string PageNum = "";
        /// <summary>
        /// 每页记录数:查询数据的所在页号，>0 且<=1000 的整数
        /// </summary>
        [not]
        public string PageSize = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"Version+CmdId+MerCustId+BeginDate+
EndDate+ PageNum+ PageSize";
    }

    /// <summary>
    /// 取现对账返回信息
    /// </summary>
    public class RetCashReconciliation
    {
        /// <summary>
        /// 消息类型:每一种消息类型代表一种交易，此处为 CashReconciliation
        /// </summary>
        [not]
        public string CmdId = "";
        /// <summary>
        /// 应答返回码:000--调用成功
        /// </summary>
        [not]
        public string RespCode = "";
        /// <summary>
        /// 应答描述:返回码的对应中文描述	
        /// </summary>
        [not]
        public string RespDesc = "";
        /// <summary>
        /// 商户客户号:由汇付生成，商户的唯一性标识
        /// </summary>
        [not]
        public string MerCustId = "";
        /// <summary>
        /// 开始时间:YYYYMMDD 格式 BeginDate 和 EndDate 日期跨度不能大于 90 天
        /// </summary>
        [not]
        public string BeginDate = "";
        /// <summary>
        /// 结束时间:YYYYMMDD 格式 BeginDate 和 EndDate 日期跨度不能大于 90 天
        /// </summary>
        [not]
        public string EndDate = "";
        /// <summary>
        /// 页数:查询数据的所在页号，>0 的整数
        /// </summary>
        [not]
        public string PageNum = "";
        /// <summary>
        /// 每页记录数:查询数据的所在页号，>0 且<=1000 的整数
        /// </summary>
        [not]
        public string PageSize = "";
        /// <summary>
        /// 记录总条数:查询数据的所在页号，>0 的整数
        /// </summary>
        [not]
        public string TotalItems = "";
        /// <summary>
        /// 手续费收取方:U--向用户收取
        ///              M--向商户收取
        /// </summary>
        [not]
        public string FeeObj = "";
        /// <summary>
        /// 取现对账结果串
        /// </summary>
        public string CashReconciliationDtoList = "";
        /// <summary>
        /// 订单号
        /// </summary>
        [not]
        public string OrdId = core_huifu.getOrdId(huifu_lx.tixianduizhang);
        /// <summary>
        /// 用户客户号
        /// </summary>
        [not]
        public string UsrCustId = "";
        /// <summary>
        /// 开户银行账号
        /// </summary>
        [not]
        public string CardId = "";
        /// <summary>
        /// 交易金额
        /// </summary>
        [not]
        [jine]
        public string TransAmt = "";
        /// <summary>
        /// 汇付交易状态
        /// </summary>
        [not]
        public string TransStat = "";
        /// <summary>
        /// 手续费金额
        /// </summary>
        [not]
        [jine]
        public string FeeAmt = "";
        /// <summary>
        /// 商户收取服务费金额
        /// </summary>
        [not]
        [jine]
        public string ServFee = "";
        /// <summary>
        /// 商户子账户号
        /// </summary>
        [not]
        public string ServFeeAcctId = "";
        /// <summary>
        /// 汇付交易日期
        /// </summary>
        [not]
        public string PnrDate = "";
        /// <summary>
        /// 汇付交易流水
        /// </summary>
        [not]
        public string PnrSeqId = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = "CmdId+RespCode+MerCustId+ BeginDate+EndDate+PageNum+PageSize+TotalItems+ FeeObj";
    }

    /// <summary>
    /// 充值对账 后台实时返回
    /// </summary>
    public class SaveReconciliation
    {
        /// <summary>
        /// 版本号
        /// </summary>
        [not]
        public string Version = "10";
        /// <summary>
        /// 消息类型
        /// </summary>
        [not]
        public string CmdId = "SaveReconciliation";
        /// <summary>
        /// 商户客户号
        /// </summary>
        [not]
        public string MerCustId = "";
        /// <summary>
        /// 开始时间
        /// </summary>
        [not]
        public string BeginDate = "";
        /// <summary>
        /// 结束时间
        /// </summary>
        [not]
        public string EndDate = "";
        /// <summary>
        /// 页数
        /// </summary>
        [not]
        public string PageNum = "";
        /// <summary>
        /// 每页记录数
        /// </summary>
        [not]
        public string PageSize = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"Version+CmdId+MerCustId+BeginDate+
EndDate+PageNum+PageSize";
    }

    /// <summary>
    /// 充值对账返回信息
    /// </summary>
    public class RetSaveReconciliation
    {
        /// <summary>
        /// 消息类型
        /// </summary>
        [not]
        public string CmdId = "";
        /// <summary>
        /// 应答返回码
        /// </summary>
        [not]
        public string RespCode = "";
        /// <summary>
        /// 应答描述
        /// </summary>
        [not]
        public string RespDesc = "";
        /// <summary>
        /// 商户客户号
        /// </summary>
        [not]
        public string MerCustId = "";
        /// <summary>
        /// 开始时间
        /// </summary>
        [not]
        public string BeginDate = "";
        /// <summary>
        /// 结束时间
        /// </summary>
        [not]
        public string EndDate = "";
        /// <summary>
        /// 页数
        /// </summary>
        [not]
        public string PageNum = "";
        /// <summary>
        /// 每页记录数
        /// </summary>
        [not]
        public string PageSize = "";
        /// <summary>
        /// 记录总条数
        /// </summary>
        [not]
        public string TotalItems = "";
        /// <summary>
        /// 冲值对账结果串
        /// </summary>        
        public string SaveReconciliationDtoList = "";
        /// <summary>
        /// 用户客户号
        /// </summary>
        [not]
        public string UsrCustId = "";
        /// <summary>
        /// 订单号
        /// </summary>
        [not]
        public string OrdId = "";
        /// <summary>
        /// 订单日期
        /// </summary>
        [not]
        public string OrdDate = "";
        /// <summary>
        /// 交易金额
        /// </summary>
        [not]
        [jine]
        public string TransAmt = "";
        /// <summary>
        /// 汇付交易状态
        /// </summary>
        [not]
        public string TransStat = "";
        /// <summary>
        /// 支付网关业务代号
        /// </summary>
        [not]
        public string GateBusiId = "";
        /// <summary>
        /// 开户银行代号
        /// </summary>
        [not]
        public string OpenBankId = "";
        /// <summary>
        /// 开户银行账号
        /// </summary>
        [not]
        public string OpenAcctId = "";
        /// <summary>
        /// 手续费金额
        /// </summary>
        [not]
        [jine]
        public string FeeAmt = "";
        /// <summary>
        /// 手续费扣款客户号
        /// </summary>
        [not]
        public string FeeCustId = "";
        /// <summary>
        /// 手续费扣款子账户号
        /// </summary>
        [not]
        public string FeeAcctId = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = "CmdId+RespCode+MerCustId+ BeginDate+EndDate+PageNum+PageSize+TotalItems";
    }

    /// <summary>
    /// 债券转让 web调用方式
    /// </summary>
    public class CreditAssign
    {
        /// <summary>
        /// 版本号
        /// </summary>
        [not]
        public string Version = "10";
        /// <summary>
        /// 消息类型
        /// </summary>
        [not]
        public string CmdId = "CreditAssign";
        /// <summary>
        /// 商户客户号
        /// </summary>
        [not]
        public string MerCustId = "";
        /// <summary>
        /// 转让人客户号
        /// </summary>
        [not]
        public string SellCustId = "";
        /// <summary>
        /// 转让金额
        /// </summary>
        [not]
        [jine]
        public string CreditAmt = "";
        /// <summary>
        /// 承接金额
        /// </summary>
        [not]
        [jine]
        public string CreditDealAmt = "";
        /// <summary>
        /// 债权转让明细
        /// </summary>
        [not]
        public string BidDetails = "";
        /// <summary>
        /// 扣款手续费
        /// </summary>
        [not]
        [jine]
        public string Fee = "";
        /// <summary>
        /// 分账账户串
        /// </summary>
        public string DivDetails = "";
        /// <summary>
        /// 分账账户号
        /// </summary>
        [not]
        public string DivAcctId = "";
        /// <summary>
        /// 分账金额
        /// </summary>
        [not]
        [jine]
        public string DivAmt = "";
        /// <summary>
        /// 承接人客户号
        /// </summary>
        [not]
        public string BuyCustId = "";
        /// <summary>
        /// 订单日期
        /// </summary>
        [not]
        public string OrdDate = DateTime.Now.ToString("yyyyMMdd");
        /// <summary>
        /// 订单号
        /// </summary>
        [not]
        public string OrdId = core_huifu.getOrdId(huifu_lx.zhaiquanzhuanrang);
        /// <summary>
        /// 页面返回 URL
        /// </summary>
        public string RetUrl = "";
        /// <summary>
        /// 商户后台 应答地址
        /// </summary>
        [not]
        public string BgRetUrl = "";
        /// <summary>
        /// 商户私有域
        /// </summary>
        public string MerPriv = "";
        /// <summary>
        /// 入参扩展域
        /// </summary>
        public string ReqExt = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"Version + CmdId + MerCustId + SellCustId +
CreditAmt  +  CreditDealAmt  +  BidDetails  +
Fee  +  DivDetails  +  BuyCustId  +  OrdId  + OrdDate  +  RetUrl  +  BgRetUrl  +  MerPriv+ReqExt";


    }

    /// <summary>
    /// 债券转让返回信息
    /// </summary>
    public class RetCreditAssign
    {
        /// <summary>
        /// 消息类型
        /// </summary>
        [not]
        public string CmdId = "";
        /// <summary>
        /// 应答返回码
        /// </summary>
        [not]
        public string RespCode = "";
        /// <summary>
        /// 应答描述
        /// </summary>
        [not]
        public string RespDesc = "";
        /// <summary>
        /// 商户客户号
        /// </summary>
        [not]
        public string MerCustId = "";
        /// <summary>
        /// 转让人客户号
        /// </summary>
        [not]
        public string SellCustId = "";
        /// <summary>
        /// 转让金额
        /// </summary>
        [not]
        [jine]
        public string CreditAmt = "";
        /// <summary>
        /// 承接金额
        /// </summary>
        [not]
        [jine]
        public string CreditDealAmt = "";
        /// <summary>
        /// 扣款手续费
        /// </summary>
        [not]
        [jine]
        public string Fee = "";
        /// <summary>
        /// 承接人客户号
        /// </summary>
        [not]
        public string BuyCustId = "";
        /// <summary>
        /// 订单号
        /// </summary>
        [not]
        public string OrdId = "";
        /// <summary>
        /// 订单日期
        /// </summary>
        [not]
        public string OrdDate = "";
        /// <summary>
        /// 页面返回 URL
        /// </summary>
        public string RetUrl = "";
        /// <summary>
        /// 商户后台应答地址
        /// </summary>
        [not]
        public string BgRetUrl = "";
        /// <summary>
        /// 商户私有域
        /// </summary>
        public string MerPriv = "";
        /// <summary>
        /// 返参扩展域
        /// </summary>
        public string RespExt = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"CmdId    +    RespCode    +    MerCustId    +
SellCustId  + CreditAmt  + CreditDealAmt  +
Fee  +  BuyCustId  +  OrdId  +  OrdDate  + RetUrl + BgRetUrl + MerPriv+ RespExt";
    }


    /// <summary>
    /// 商户内部用户转账情况
    /// </summary>
    public class UsrTransfer
    {
        /// <summary>
        /// 版本号
        /// </summary>
        [not]
        public string Version = "10";
        /// <summary>
        /// 消息类型
        /// </summary>
        [not]
        public string CmdId = "";
        /// <summary>
        /// 商户客户号
        /// </summary>
        public string MerCustId = "";
        /// <summary>
        /// 订单号
        /// </summary>
        [not]
        public string OrdId = core_huifu.getOrdId(huifu_lx.shanghuzhuangzhangneibu);
        /// <summary>
        /// 页面返回 URL
        /// </summary>
        [not]
        public string RetUrl = "";
        /// <summary>
        /// 商户后台应答地址
        /// </summary>
        [not]
        public string BgRetUrl = "";
        /// <summary>
        /// 用户客户号
        /// </summary>
        [not]
        public string UsrCustId = "";
        /// <summary>
        /// 入账客户号
        /// </summary>
        [not]
        public string InUsrCustId = "";
        /// <summary>
        /// 交易金额
        /// </summary>
        [not]
        [jine]
        public string TransAmt = "";
        /// <summary>
        /// 商户私有域
        /// </summary>
        [not]
        public string MerPriv = "";
        /// <summary>
        /// 入参扩展域
        /// </summary>
        public string RespExt = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"Version + CmdId + OrdId + UsrCustId + MerCustId + TransAmt + InUsrCustId + RetUrl + BgRetUrl + MerPriv + RespExt ";
    }

    /// <summary>
    /// 商户内部用户转账情况 返回信息
    /// </summary>
    public class RetUsrTransfer
    {
        /// <summary>
        /// 消息类型
        /// </summary>
        [not]
        public string CmdId = "";
        /// <summary>
        /// 应答返回码
        /// </summary>
        [not]
        public string RespCode = "";
        /// <summary>
        /// 应答描述
        /// </summary>
        [not]
        public string RespDesc = "";
        /// <summary>
        /// 商户客户号
        /// </summary>
        [not]
        public string MerCustId = "";
        /// <summary>
        /// 订单号
        /// </summary>
        [not]
        public string OrdId = "";
        /// <summary>
        /// 页面返回 URL
        /// </summary>
        [not]
        public string RetUrl = "";
        /// <summary>
        /// 商户后台应答地址
        /// </summary>
        [not]
        public string BgRetUrl = "";
        /// <summary>
        /// 用户客户号
        /// </summary>
        [not]
        public string UsrCustId = "";
        /// <summary>
        /// 入账客户号
        /// </summary>
        [not]
        public string InUsrCustId = "";
        /// <summary>
        /// 交易金额
        /// </summary>
        [not]
        [jine]
        public string TransAmt = "";
        /// <summary>
        /// 商户私有域
        /// </summary>
        [not]
        public string MerPriv = "";
        /// <summary>
        /// 返参扩展域
        /// </summary>
        public string RespExt = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"CmdId + RespCode + OrdId + MerCustId + UsrCustId  +  TransAmt + InUsrCustId  + RetUrl + BgRetUrl + MerPriv + RespExt";
    }

    /// <summary>
    /// 后台冻结金额
    /// </summary>
    public class UsrFreezeBg
    {
        /// <summary>
        /// 版本号
        /// </summary>
        [not]
        public string Version = "10";
        /// <summary>
        /// 消息类型
        /// </summary>
        [not]
        public string CmdId = "UsrFreezeBg";
        /// <summary>
        /// 商户客户号
        /// </summary>
        [not]
        public string MerCustId = "";
        /// <summary>
        /// 用户客户号
        /// </summary>
        [not]
        public string UsrCustId = "";
        /// <summary>
        /// 子账户类型
        /// </summary>
        public string SubAcctType = "";
        /// <summary>
        /// 子账户号
        /// </summary>
        public string SubAcct = "";
        /// <summary>
        /// 订单日期
        /// </summary>
        [not]
        public string OrdDate = DateTime.Now.ToString("yyyyMMdd");
        /// <summary>
        /// 订单号
        /// </summary>
        [not]
        public string OrdId = core_huifu.getOrdId(huifu_lx.dongjie);
        /// <summary>
        /// 交易金额
        /// </summary>
        [not]
        [jine]
        public string TransAmt = "";
        /// <summary>
        /// 页面返回 URL
        /// </summary>
        public string RetUrl = "";
        /// <summary>
        /// 商户后台 应答地址
        /// </summary>
        [not]
        public string BgRetUrl = "";
        /// <summary>
        /// 商户私有域
        /// </summary>
        public string MerPriv = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"Version + CmdId + MerCustId + UsrCustId + SubAcctType + SubAcct + OrdId + OrdDate + TransAmt + RetUrl+BgRetUrl + MerPriv ";
    }

    /// <summary>
    /// 资金冻结放回信息
    /// </summary>
    public class RetUsrFreezeBg
    {
        /// <summary>
        /// 消息类型
        /// </summary>
        [not]
        public string CmdId = "";
        /// <summary>
        /// 应答返回码
        /// </summary>
        [not]
        public string RespCode = "";
        /// <summary>
        /// 应答描述
        /// </summary>
        [not]
        public string RespDesc = "";
        /// <summary>
        /// 商户客户号
        /// </summary>
        [not]
        public string MerCustId = "";
        /// <summary>
        /// 用户客户号
        /// </summary>
        [not]
        public string UsrCustId = "";
        /// <summary>
        /// 子账户类型
        /// </summary>
        public string SubAcctType = "";
        /// <summary>
        /// 子账户号
        /// </summary>
        public string SubAcctId = "";
        /// <summary>
        /// 订单号
        /// </summary>
        [not]
        public string OrdId = "";
        /// <summary>
        /// 订单日期
        /// </summary>
        [not]
        public string OrdDate = "";
        /// <summary>
        /// 交易金额
        /// </summary>
        [not]
        [jine]
        public string TransAmt = "";
        /// <summary>
        /// 页面返回 URL
        /// </summary>
        public string RetUrl = "";
        /// <summary>
        /// 商户后台 应答地址
        /// </summary>
        [not]
        public string BgRetUrl = "";
        /// <summary>
        /// 本平台交易唯一标识
        /// </summary>
        public string TrxId = "";
        /// <summary>
        /// 商户私有域
        /// </summary>
        public string MerPriv = "";
        /// <summary>
        /// 签名
        /// </summary>
        [not]
        public string ChkValue = @"CmdId + RespCode + RespDesc + MerCustId + UsrCustId  +  SubAcctType + SubAcctId  + OrdId + OrdDate +TransAmt+ RetUrl+BgRetUrl+TrxId+MerPriv";

    }
}